"There is already an open datareader associated with this command which must be closed first"

2 posts, 1 answers
  1. Rich
    Rich avatar
    9 posts
    Member since:
    Dec 2016

    Posted 17 Apr Link to this post

    Hi, I've got  a TabControl, with several TabPages, with RadGridViews i nthem.

    I pretty much let the GUI do most of the wiring up of the grids & data..

    Everything seems to be working except, I'm getting the above message when I

    Add a new Row.

    As soon as the row is added, I get the icon on the row, and that message.

    The row adds just fine, and I can update it, & delete it as well.

     

    Without posting the entirety of the projects code, is there a place I might look to first, to find why I've

    apparently got two datareaders open?

    Attached is what I see after adding that new row, and scrolling to the bottom of the data grid.

    Rich

     

  2. Answer
    Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3997 posts

    Posted 21 Apr Link to this post

    Hello, Rich,

    Your question has already been answered in the other thread (Ticket ID: 1462589) you have opened on the same topic. Please, see our answer there for more information.

    However, I am posting the answer here as well in order the community to benefit from it. 

    The following help article demonstrates different approaches for storing the changes from RadGridView to the database: https://docs.telerik.com/devtools/winforms/controls/gridview/populating-with-data/updating-the-database-with-ado.net

    As to the specific error message, "There is already an open DataReader associated with this Command which must be closed first", it doesn't seem to be directly related to RadGridView. After some research in general programming forums, I have found the following threads that may be suitable for your case:
    https://stackoverflow.com/questions/6062192/there-is-already-an-open-datareader-associated-with-this-command-which-must-be-c
    https://stackoverflow.com/questions/18475195/error-there-is-a

    We kindly ask you to use just one thread for a specific problem to contact us. Posting the same questions numerous times slows down our response time because we will need to review and address two or more tickets instead of one. Moreover, threads are handled according to license and time of posting, so if it is an urgent problem, we suggest you use a support ticket, which would be handled before a forum thread.

    Thank you for your understanding.

    Regards,
    Dess | Tech Support Engineer, Sr.
    Progress Telerik

    Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
    Our thoughts here at Progress are with those affected by the outbreak.
Back to Top