Article ID: 109995
Article Last Modified on 10/30/2003
Sub Command1_Click ()
Dim db As database
Dim ds As Dynaset
Set db = OpenDatabase("Biblio.mdb")
Set ds = db.CreateDynaset("authors")
' Create the complete Dynaset before starting the transaction.
ds.MoveLast
ds.MoveFirst
' Populate the listbox with the contents of the Dynaset.
BeginTrans
While Not ds.EOF
list1.AddItem ds(0)
ds.MoveNext
Wend
Rollback
ds.MoveFirst
While Not ds.EOF
list2.AddItem ds(0)
ds.MoveNext
Wend
End Sub
Sub Command1_Click ()
Dim db As database
Dim ds As Dynaset
Set db = OpenDatabase("Biblio.mdb")
Set ds = db.CreateDynaset("authors")
'This code populates the listbox with the contents of the Dynaset.
BeginTrans
While Not ds.EOF
list1.AddItem ds(0)
ds.MoveNext
Wend
Rollback
'This code reports only one record in the dynaset.
ds.MoveFirst
While Not ds.EOF
list2.AddItem ds(0)
ds.MoveNext
Wend
End Sub
Additional query words: 3.00
Keywords: kbprb KB109995