Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How does Jet know a transaction is pending?

Status
Not open for further replies.

arnierudy

Programmer
Mar 26, 2002
12
US
When you start a transaction with BeginTrans, Jet knows you have done so, because if you try to do a RollBack without having first done a BeginTrans an error is raised. I always set a boolean to True when I do the BeginTrans and False when I Roll back or Commit, but there MUST be some property of the Workspace or database object that is changed when a transaction is begun and ended. Anybody know what it is?
 
That is the way it is done. You either have to do a On Error Resume Next before the Rollback or set a boolean.
However, why?

(You Should) Use a 2nd Error handler for code with-in Transactions. Just before the BeginTrans set the On Error Goto to this ErrHandler and after the commit set it back to the normal error handler.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top