We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback
Platform : ASP.NET
Category : ADO.NET

Why do I get the error message "There is already an open DataReader associated with this Connection which must be closed first."

This is caused if you are attempting to use the same DataReader more than once in your code without closing the previous Datareader. Or you might have a DataReader open on the same connection as the DataAdapter/Command uses. So it is not recommended to share a connection between a DataReader and a DataAdapter/Command
  • Either close the first connection or,
  • if you must keep it open as you are executing another reader from within it, use another connection object.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon