Error using Transaction

J

Jean-Marc

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top