Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / February 2006

Tip: Looking for answers? Try searching our database.

Test open DAO transactions

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dirk - 06 Feb 2006 15:57 GMT
Hi,

In my code I would like to test wether a transaction is open. Is there a way
to get the number of open transactions from CurrentDb or should I manually
keep count and Reroll accordingly if an error occurs? Naturally I want to
avoid rolling back when there are no transactions open, since that generates
an additional error.
Allen Browne - 07 Feb 2006 01:58 GMT
AFAIK, Access does not expose to you the number of uncommitted DAO
transactions, nor the way in which they are nested (to 5 levels, from
memory.) You need to do that yourself.

There is a discussion of the typical traps when using transactions in this
article:
   Archive: Move Records to Another Table
at:
   http://allenbrowne.com/ser-37.html
along with the usual approach of setting a flag in the procedure that
creates the transaction so you know its status.

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> In my code I would like to test wether a transaction is open. Is there a
> way
[quoted text clipped - 3 lines]
> generates
> an additional error.
Dirk - 07 Feb 2006 10:17 GMT
Thanks. Just the answer I was looking for. Too bad it is not the 'perfect'
solution (hard to manage transactions spanning multiple modules without
setting up some sort of globally accessible framework). But I think I can
make it work in my app.

"Allen Browne" schreef:

> AFAIK, Access does not expose to you the number of uncommitted DAO
> transactions, nor the way in which they are nested (to 5 levels, from
[quoted text clipped - 15 lines]
> > generates
> > an additional error.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.