Information générale
Catégorie:
The Mere Mortals .NET Framework
Titre:
Error adding record when grid sorted
Versions des environnements
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?
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement