none
How to rollback a DataSet? RRS feed

  • Question

  • Hello,

    My DataSet is read from/saved into Oracle via OracleDataAdapter.

    When I call Update on the DataSet so as to save the changes to the database, this Update is contained by an Oracle transaction, which allows me to rollback all the database changes should an error occur during the Update.

    However, this does not roll back the Update at the level of the DataSet, so I sometimes end up with rows that have row status "Unchanged" (from the Update implicitly calling AcceptChanges) whereas other rows are still in their initial state (Added/Modified/Deleted).

    In other words, my DataSet is no longer coherent.

    I would like to roll back the DataSet to the state it was in when I first called Update.

    Note that for some (complicated) reason I cannot set "AcceptChangesDuringUpdate = false".

    Thank you,

    Danny

    Thursday, June 7, 2018 4:30 PM

All replies