limit to content of transaction

  • Thread starter Thread starter Jesper F
  • Start date Start date
J

Jesper F

I'm experimenting with transactions in my db.
What limits are there as to what can be rolled back if
something fails. Several subsequent action queries work I
guess.
What about variable settings?
Rolling back appended rows with rs.addnew etc?
Is it a bad idea to include too much in a transaction?
 
The boundardies of the transaction relate to the object structure where you
created it.

If you BeginTrans on Workspace(0), when you Execte an action where on the
Database object in the default workspace you can roll it back. However, if
you RunSQL, that action query is not executed within the transaction.
Likewise if you OpenRecordset on the Database within the the transaction, it
will return you the uncommitted data, whereas if you DLookup() the tables
you will not find the uncommitted data.

In general, you don't want to leave transactions hanging longer than
necessary. If you leave them uncommitted while users are modifying the data
in the same tables, the chances of a conflict increase greatly.

For an example and general tips on avoiding the pitfalls with DAO
transactions, see:
Archive: Move Records to Another Table
at:
http://members.iinet.net.au/~allenbrowne/ser-37.html
 
Back
Top