Canceling an transaction

rberkers

Registered User.
Local time
Today, 18:46
Joined
Sep 16, 2008
Messages
14
A small question here...

In an application I am writing I use transactions to make sure all what that happens to the active records goes well (and if not a rollback can be performed).
This all works well. No problem there.

But I wondered, if I started an transaction on a record and for whatever reason I decide not to write the changes to the table (so there will be no update and commit towards the table), is there anything special I should do to cancel the transaction as well? Or will the begin of an new transaction on a new record or the closing of the recordset be enough?

Thanks in advance,
Rob.
 
If your not sure what happens in Access make sure you do it yourself.

If for some reason you decide that the transaction must be aborted, roll it back yourself. I don't think you can nest a transaction so if you open another transaction, you will probably get an runtime error.

Share and Enjoy!
 
You can nest transactions. To end a transaction you either have to commit it or roll it back. If you commit a nested transaction and rollback the parent then you will rollback the nested commited transaction.

if I started an transaction on a record and for whatever reason I decide not to write the changes...
...then you rollback the transaction.
 

Users who are viewing this thread

Back
Top Bottom