This is a migrated thread and some comments may be shown as answers.
"There is already an open datareader associated with this command which must be closed first"
1 Answer 63 Views
This is a migrated thread and some comments may be shown as answers.
Rich
Top achievements
Rank 2
Rich asked on 17 Apr 2020, 04:33 PM

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

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 21 Apr 2020, 09:38 AM

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.
Asked by
Rich
Top achievements
Rank 2
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or