I have a dataset with a Parent/Child relationship on its 2 tables. I am
using a DataAdapter and the Update method to write changes to the database.
However, I have a problem when I get a concurrency error. I need to inform
the user of the problem and give them an option to discard changes or
overwrite. If the user selects overwrite, I need to delete all child records
(from the database) and then insert the child records from the dataset. I
have to delete first, just in case there are extra child records that are
not in the dataset.
However, if my dataset has modified child records, I now have to insert them
and not update them. How can I change the read-only rowstate property so
that all the modified records are now marked added so that the Update
command will use the insert command instead of the update command.?
Phil
|