ADO Transaction not working. 
Author Message
 ADO Transaction not working.

Below is some pseudo code that does not show an insert after a transaction
has finished.  The database is Access 97.  The insert does show after some
short (secounds?) period of time.

        Set Rec = New ADODB.Recordset

        SqlStr = "select * from tmp"

        Rec.Open SqlStr, db, adOpenDynamic, adLockOptimistic, adCmdText

        db.BeginTrans

        AttachRec.AddNew

        Rec("TempInt") = 1

        AttachRec.Update

         db.CommitTrans

         DoEvents
         AttachRec.Close
         SqlStr = "select * from tmp where tmp.tmpint = 1"
         Rec.Open SqlStr, db, adOpenDynamic, adLockOptimistic
         If Rec.RecordCount <= 0 Then
            MsgBox "Record not inserted"
         End If



Fri, 02 Nov 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. ADO transactions don't work (BeginTrans, CommitTrans, RollbackTrans)

2. VB5 Datacontrol and Transactions not working?

3. Creating ADO recordset w/o database .Append not working correctly IIS5 win2000 Prof not .Net

4. ADODB TRANSACTION ADO ERROR No Transaction is Active

5. ADODB TRANSACTION ADO ERROR No Transaction is Active

6. ADO Connection Transaction vs. ObjectContext Transaction

7. When to use MTS transactions and ADO Transactions

8. To Transaction or Not to Transaction that is the question

9. Why to use COM+ transaction and not just SQL Server transaction

10. Why to use COM+ transaction and not just SQL Server transaction

11. rs.Find not working in ADO

12. ADO SP ReturnValue Params not working and problems with Command.Append

 

 
Powered by phpBB® Forum Software