1
Answer

Rollback DataSet changes

Administrator

Administrator

21y
2.3k
1
I've got the following scenario: One DataSet with 5 related tables. I use -for each table- a DataAdapter.Update method to post changes to the DBMS -we know that this method implicitly calls the AcceptChanges method of each succesfully updated row. When one of the last table updates failed, I rollbacked the transaction I started with the following results: - The information in the database stays correct, but - I didn't find any way to rollback the changes in my dataset!!! I just found a way, copying the dataset before updating it, and replacing it in case of update failure. I just want to know if there is any technique more stylish. I'll appreciate any advice. Thanks in advance, Saker.
Answers (1)