Home » Infrastructure » Windows » Autocommit and VB
Autocommit and VB [message #100686] Tue, 20 May 2003 01:22 Go to next message
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 Go to previous message
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
Previous Topic: Best connection to Oracle
Next Topic: "ORACLE Not Found" Message in XP while installing 8i Personal.
Goto Forum:
  


Current Time: Fri Apr 19 19:17:50 CDT 2024