Error using Transaction

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi,

I am unable to have transactions working.

Using Access 2003 on a straight .mdb database.

In the VBA code of a Form callback function:

CurrentProject.Connection.BeginTrans
Dim rsTAnnee As New ADODB.Recordset
rsTAnnee.Open "SELECT * FROM Annee", CurrentProject.Connection,
adOpenDynamic, adLockOptimistic
rsTAnnee.AddNew
rsTAnnee!annee = 1999
rsTAnnee.Update
CurrentProject.Connection.RollbackTrans

when execution reaches 'RollbackTrans', the system always throw the
error: 'You tried to commit or rollback a transaction without first
beginning a transaction'

I checked the connection and the 'Transaction DDL' property is defined.

.



Relevant Pages

  • Transaktion mit Access
    ... Bei manchen mehrstufigen Updates und Inserts ... 'adoConnection.BeginTrans'absetzen und nach Abschluss aller Updates ein ... CommitTrans (oder RollBackTrans, bei Fehlern) oder bedarf es dazu ... Bzw die SQL-Kommandos BEGIN TRANSACTION, ...
    (microsoft.public.de.access)
  • Re: UpdateBatch Problem
    ... is there a specific reason for using explicit transactions? ... Have you tried letting ADO handle the transaction implicitly? ... Your RollBackTrans, rolled everything back on the server (internal cache ... You could either try not using explicit transaction or if letting ADO ...
    (borland.public.delphi.database.ado)
  • Re: Cancelling append query execution from VBA
    ... Ctrl+Break interrupts the VBA code that is executing. ... transaction. ... > How do I cancel an append query execution from MS Access code? ...
    (microsoft.public.access.formscoding)