Article ID: 179616
Article Last Modified on 1/8/2003
Private Sub Command1_Click()
Dim rs As Recordset
Dim db As Database
Set db = OpenDatabase("c:\mikework\dbs\nwind.mdb", 0, False, "")
Set rs = db.OpenRecordset("SELECT ContactName FROM Customers", _
dbOpenDynaset, 0, dbPessimistic)
rs.Edit 'This sets the editmode to 1.
rs!ContactName = rs!ContactName & "H"
Debug.Print rs.EditMode 'This will be 1.
'rs.Update 'Uncomment this line for workaround.
'Start the transaction.
BeginTrans
'The processing that occurs in this transaction is unrelated
'to the above recordset.
Rollback
Debug.Print rs.EditMode 'Editmode is now 0.
rs.Update '<<Error will occur on this line.
rs.Close
db.Close
End Sub
Additional query words: kbVBp500 kbdse kbDSupport kbVBp kbDAO
Keywords: kbprb KB179616