Administrator

Administrator

  • Tech Writer
  • 2.2k
  • 1.5m

Rollback DataSet changes

Apr 8 2003 1:01 PM
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)