Deleting then selecting from a dataset using linq to dataset
-
I try to remove an item from a DataSet using DataRow.Delete(), then I try to do a linq query operation to select from the same table. I always get an exception because the deleted rows cannot be accessed. "Deleted row information cannot be accessed through the row." Is there a way to overcome this error while selecting?
Mohamed El Gohary
-
I try to remove an item from a DataSet using DataRow.Delete(), then I try to do a linq query operation to select from the same table. I always get an exception because the deleted rows cannot be accessed. "Deleted row information cannot be accessed through the row." Is there a way to overcome this error while selecting?
Mohamed El Gohary
Did you commit your delete prior to your select? Don't have VS on this machine but I think it's something like context.SubmitUpdates();
-
Did you commit your delete prior to your select? Don't have VS on this machine but I think it's something like context.SubmitUpdates();
I run into the same issue today, I solved it by calling dataset.AcceptChanges(); :)