Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error adding record when grid sorted
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Error adding record when grid sorted
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01230520
Message ID:
01230520
Views:
61
I have been trying for days to simply add a new record to the main business object without success and the problem seems to be related to whether or not the grid has been sorted before adding the record. In the sample C# Order App, I can select a customer and then add a new order without problems. If I sort the order grid on the OrderID column and add a record, I get the following error when saving:

"There is already an open DataReader associated with this Command which must be closed first."

After days or trying to debug this, I have given up. There are other problems that arise when the columns are sorted, such as positioning on the "last" row after adding a record but the last row will vary depending on the sorting column. When sorted on OrderID, the First row is the new record. When Not sorted, the Last row is the new record. This may be a trivial problem for an experienced .Net person but is causing me great problems. Can anyone help point me in the right direction?
Next
Reply
Map
View

Click here to load this message in the networking platform