Update Question

  • Thread starter Thread starter Rick
  • Start date Start date
R

Rick

Hi,

In updating the db I use datasets with a data adapter. Each dataset has
multiple tables with a parent-child relationships. With that in mind, my
update has a hierarchical order to it in which I use a transaction object.
When I pass my dataset to the dataadpater for each table I call
AcceptChanges() method after the update. If there is an error I rollback
all updates via the transaction object, how can I roll back the
AcceptChanges on each datatable?

Thanks
 
Update calls acceptchanges for you as it updates each row. You don't need
to call it again afterward. There is no rollback on it... you'll need to
make a copy of the datatable for instance if you need to get this info back.
 
Thanks,

If, for some reason there is an error and the app rollbacks the update.
What is the best way to get around this with the DataSet?

Thanks again
 
You could use the ContinueUpdateOnError which will keep trying and submit
what it can. May or may not be a fit here, really depends on the ultimate
update strategy.
 
Back
Top