|
 |
access thread: BeginTrans not holding
Message #1 by "Toni Steinhauer" <toni@t...> on Fri, 22 Feb 2002 20:31:52
|
|
What could possibly be 'undoing' a BeginTrans? I have a VBA script in
Access that obviously executes a BeginTrans, but when the CommitTrans is
executed, I get an error indicating that I tried to do a CommitTrans
without doing a BeginTrans. I have set breakpoints to make sure that the
BeginTrans is executed, and it definitely is.
Any ideas?
Message #2 by "John Ruff" <papparuff@c...> on Fri, 22 Feb 2002 12:45:08 -0800
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_000A_01C1BB9E.C735C020
Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: 7bit
Without seeing your code, it's hard to tell what's going on.
John Ruff - The Eternal Optimist :-)
Always looking for Contract Opportunities
9306 Farwest Dr SW
Lakewood, WA 98498
papparuff@c...
-----Original Message-----
From: Toni Steinhauer [mailto:toni@t...]
Sent: Friday, February 22, 2002 8:32 PM
To: Access
Subject: [access] BeginTrans not holding
What could possibly be 'undoing' a BeginTrans? I have a VBA script in
Access that obviously executes a BeginTrans, but when the CommitTrans is
executed, I get an error indicating that I tried to do a CommitTrans
without doing a BeginTrans. I have set breakpoints to make sure that the
BeginTrans is executed, and it definitely is.
Any ideas?
Message #3 by "Randy Cornish" <rlcornish@c...> on Sat, 23 Feb 2002 18:39:02
|
|
Often, people place a Rollback command in their error-handler. Are you
getting any errors that may be triggering a Rollback command?
Also, is the DB connection that you are doing the BeginTrans on the same
one you are doing the Commit? Perhaps this is a scope issue.
One strategy is to wrap the Begin, Rollback and Commit in separate
functions (you would obviously need a connection at the proper scope to
do this). Then, it is easier to track all transaction commands because
they flow thru the same place (i.e. MyBeginTrans, MyRollback, ...)
R
> What could possibly be 'undoing' a BeginTrans? I have a VBA script in
> Access that obviously executes a BeginTrans, but when the CommitTrans
is
> executed, I get an error indicating that I tried to do a CommitTrans
> without doing a BeginTrans. I have set breakpoints to make sure that
the
> BeginTrans is executed, and it definitely is.
>
> Any ideas?
|
|
 |