Article ID: 145757
Article Last Modified on 1/8/2003
BeginTrans
Statement1....
Statement2....
Statement3....
Statement4.... '*** If you have a number of statements, you could
'*** slow processing in a multi-user system, or
'*** increase the chance of an error occurring.
CommitTrans (or Rollback)
BeginTrans
Statement1....
form2.Show or form2.Show 1 or Load form2 '* Not recommended.
Statement3....
Statement4....
CommitTrans (or Rollback)
BeginTrans
Statement1....
form2.Show or Load form2 '*** Not recommended, may cause error
'*** 3034 'Commit or Rollback without
'*** BeginTrans' to occur.
Statement3....
Statement4....
CommitTrans (or Rollback)
BeginTrans
Statement1....
Data1.Refresh '*** Not recommended, may cause error 3034
'*** 'Commit or Rollback without BeginTrans'
Statement3.... '*** to occur.
Statement4....
CommitTrans (or Rollback)
BeginTrans
Dim db As Database '*** Not recommended.
Dim ds As Dynaset '*** Not recommended.
Dim tb As Table '*** Not recommended.
Dim sn As Snapshot '*** Not recommended.
Dim qy As Querydef '*** Not recommended.
Statement1....
Statement2....
CommitTrans (or Rollback)
BeginTrans
Statement1....
Set db = Opendatabase("Biblio.MDB") '*** Not recommended.
Set ds = Opentable("Authors") '*** Not recommended.
ds.Close '*** Not recommended.
db.Close '*** Not recommended.
Statement6....
Statement7....
CommitTrans (or Rollback)
BeginTrans
Statement1.... '*** The next line of code is not recommended.
Set db = CreateDatabase("Mydb.MDB", DB_LANG_GENERAL, False)
Set ds = db.CreateDynaset("Titles") '*** Not recommended.
Set sn = db.CreateSnapshot("Publishers") '*** Not recommended.
Set qy = db.CreateQueryDef("Query1", "Select * From Authors;")
'*** The previous line of code is not recommended.
Statement6....
Statement7....
CommitTrans (or Rollback)
103807 : How to Convert a Text File into a New Access Database
BeginTrans
Do While Not (EOF(1))
newtb.AddNew
Line Input #1, tmp1$ '*** Retrieves empl_id.
Line Input #1, tmp2$ '*** Retrieves empl_name.
Line Input #1, tmp3$ '*** Retrieves empl_addr.
Line Input #1, tmp4$ '*** Retrieves empl_ssn.
newtb("Emp_ID") = Trim$(tmp1$) '*** Place in new field1.
newtb("Emp_Name") = Trim$(tmp2$) '*** Place in new field2.
newtb("Emp_Addr") = Trim$(tmp3$) '*** Place in new field3.
newtb("Emp_SSN") = Trim$(tmp4$) '*** Place in new field4.
newtb.Update '*** Saving to new table.
Loop
CommitTrans
170548 : PRB: DAO Transactions to ODBC Database Can Hang Application
Additional query words: kbVBp400 kbdse kbDSupport kbVBp
Keywords: kbinfo KB145757