CommitTrans problem

CommitTrans problem

Post by Nick Watt » Thu, 12 Mar 1998 04:00:00

Has anybody had a problem using BeginTrans and CommitTrans to
encapsulate an OpenRecordset operation?  I regularly get an error
CommitTrans without BeginTrans - but this is not true, I have a
BeginTrans for every CommitTrans.

Any ideas?
Nick Watts
Dynamic Data Design Limited           Bespoke Windows Software Development
The Business & Innovation Centre                      and
Angel Way                                     Creators of StopWatch  
Bradford, West Yorkshire                  The Windows Timesheet System  
BD7 1BX                              
United Kingdom                            Tel: +44 (0)1274 841314          Fax: +44 (0)1274 841315


CommitTrans problem

Post by Patron » Thu, 12 Mar 1998 04:00:00


1. If you have something like an "On Error Resume/Next"in your Code,
you have the following problem:

When an error occurs, the Endgine seems to rollback automatically. So,
if you try to Commit, ist over....

In this case: Track the Errors and dont commit after Errors.

2.  Do NOOOOOT use MsgBoxes inbetween Begin and Commit!

Michael Patron


1. BeginTrans, CommitTrans problems

Hello group,

I have a VB 6 application running against a SQL Server 2000 database using
ADO. At the
beginning of the application, I open a connection to the database globally
and use that connection throughout the application. In one program, I have
to do updates to several tables for the entry of an order and creation of
accounting transactions. I want to be sure that this entire group of
transactions go into the database, so I am using a BeginTrans on the
connection before starting the updates, and then doing a CommitTrans when I
am finished. Whenever I try to run this, I get all sorts of strange errors
such as "too many transactions" or "connection is in a zombie state" (no
kidding, it really says "zombie state").

I am doing plain old updates to the affected recordsets using the .addnew
method and it works fine if I take out the begintrans, endtrans statements.

Does anyone have a clue what I might be doing wrong?

Kevin McElhiney

2. Exec sp into #temptable

3. DAO BeginTrans/CommitTrans problem...

4. Please help! Postgresql or Sybase?

5. CommitTrans Problem...(Error Msg:No open cursor or cursor closed)

6. RDBMS vendor strategies?

7. BeginTrans/CommitTrans ADO problem

8. Newbie Acc97 Pass Thru to SQL Server SP

9. Problem with RDO ResultSets and CommitTrans

10. dbgrid() problem w.r.t begintrans, committrans, runtime error 3034

11. CommitTrans / Rollback problems - VB5 & Access 97