rollbacktrans problems

R

rick

anyone ever had any luck with the rollbacktrans method. I can't seem t
get it to undo the changes. the code is simple, no error message
either. i don't get it... thanks in advance.

Private Sub Form_Load()
Set cnn = New ADODB.Connection
cnn.Open "Provider= Microsoft.Jet.OLEDB.4.0;" & "Dat
Source=compliance_be.mdb;"
Set rs = New ADODB.Recordset
cnn.BeginTrans
rs.Open "tara", CurrentProject.Connection, adOpenDynamic
adLockPessimistic, adCmdTable
.....
end sub

Private Sub Form_Unload(Cancel As Integer)
Dim msg As Integer
msg = MsgBox("Do you want to commit all changes?", vbYesNo)
Select Case msg
Case vbYes
cnn.CommitTrans
cnn.Close
Exit Sub
Case vbNo
cnn.RollbackTrans
cnn.Close
Exit Sub
End Select
end su
 

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