Autocommit and VB [message #100686] |
Tue, 20 May 2003 01:22 |
michelle
Messages: 19 Registered: August 1999
|
Junior Member |
|
|
How do I turn autocommit off through VB? I have a program than inserts thousands of records into a table and currently each insert is committed to the database. We would like to issue our own commit statement after every 10000 records, but I have no idea what the command is in VB to do this.
|
|
|
Re: Autocommit and VB [message #100694 is a reply to message #100686] |
Fri, 23 May 2003 20:08 |
ashley collado
Messages: 5 Registered: May 2003
|
Junior Member |
|
|
hi mich,
pls try to employ this algo:
Sub InsertMyRecords()
on error goto err1
conn.BeginTrans
for i = 0 to 1000
conn.execute("yout insert statement here")
next i
conn.CommitTrans
exit sub
err1:
if err.number < 0 then
conn..RollbackTrans
end sub
|
|
|