>> up until now i have a nice datatable that merged the RecoveredChanges succesfully, and has a RowState of Modified.
Are you sure the RowStates are Modified for the merged rows When you call AcceptChanges after reading the XML back into the DataTable, that will mark all rows as Unchanged. The only way they will get changed again is if they are being matched to an existing row with a RowState of something other than Unchanged. Since it sounds like you are merging the backed up data with data you just loaded from the database, I would assume that any existing rows in the DataTable are also Unchanged. In this scenario, the result of Merging Unchanged rows with Unchanged rows is Unchanged rows.
Is GetChanges returning Nothing You mention that the changes are not being persisted, but it's not clear to me if you've determined that's because ChangedDataTable is Nothing, or if ChangedDataTable does contain rows, but the .Update call is not causing them to persist for some reason.
If GetChanges returns nothing, then I would expect the update would also not work if you directly update the DataTable itself instead of the result from GetChanges (you have indicated it doesn't work, so that makes sense to me). GetChanges effectively gives you an isolated view of the rows that are going to be touched during the Update call.
Thanks, Sarah
|