J
Jon Skeet [C# MVP]
I'm using ADO.NET on the Compact Framework (and this may turn out to be
a bug which is CF-specific, hence the cross-post) and have run into a
very strange situation.
I have a DataRowView "in my hand".
The equivalent row in the local database itself has changed.
I call DataAdapter.Fill to load the changes.
I then do some more fiddling with the in-memory table.
Finally, I call DataTable.AcceptChanges.
If anything, I'd have expected the fiddling to make the DataRowView's
IsEdit property true, and then AcceptChanges make it false. Instead,
the opposite seems to happen - AcceptChanges is putting the DataRowView
into edit mode.
Any ideas why? I have a few in-memory columns in the DataTable, some
with specific default values and one with a computed value - but I've
tried commenting out the computed value and that doesn't help...
a bug which is CF-specific, hence the cross-post) and have run into a
very strange situation.
I have a DataRowView "in my hand".
The equivalent row in the local database itself has changed.
I call DataAdapter.Fill to load the changes.
I then do some more fiddling with the in-memory table.
Finally, I call DataTable.AcceptChanges.
If anything, I'd have expected the fiddling to make the DataRowView's
IsEdit property true, and then AcceptChanges make it false. Instead,
the opposite seems to happen - AcceptChanges is putting the DataRowView
into edit mode.
Any ideas why? I have a few in-memory columns in the DataTable, some
with specific default values and one with a computed value - but I've
tried commenting out the computed value and that doesn't help...