473,388 Members | 1,335 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

COMMIT - If so many no. of records?????????

Hello..............

I have a text file with about 10000 - 15000 lines. Each line is an action SQL like Insert/Update/Delete . Using VB code I read from text file line by line and execute each line.

Dim ConLocal As New ADODB.Connection
Dim FileSys As New Scripting.FileSystemObject
Dim TxtStream As TextStream
Dim SQLString As String

'-----I wrote code to open textfile

Conn.BeginTrans
Do While Not TxtStream.AtEndOfStream
SQLString = TxtStream.ReadLine
Conn.Execute SQLString
Loop
Conn.CommitTrans

This is the basic algorithm I used, my doubt is if there are more than 10000 SQL statements in notepad, and when the control(execution sequence) is at Conn.CommitTrans(Commit is being executed!!!!) some power failure occurs in the middle, what happens

* A part of the statments are committed?(ie, 4000 out of 10000 got committed?)
* All discarded?(10000 statements roll back????)

Pls help me out of this......when I executed it out of these 10000 some lines is missing, others found!!! I can't see any errors in the VB code, kindly help me to solve this issue....

Regards
Reshmi
Dec 29 '06 #1
0 1141

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Hari Om | last post by:
Here are the details of my error log files: I execute the command and get following message at console: ---------------------------------------------------------------------- ../sqlldr...
0
by: mvr | last post by:
Hi all I am runnig a Oracle procedure(this inserts records in table) with asp.command object. I dont want to commit the inserts, I want to turn auto-commit off when I execute this procedure....
3
by: Giganews | last post by:
I presently use an SQL SP with cursors to cycle through records to update, insert etc. Within this I maintain a variable for a commit count, as in before I FETCH the next record I increment...
2
by: Darryl A. J. Staflund | last post by:
Hi there, Can anyone tell me why invoking a single SQL insert statement (well, rather, a method that performs a SQL insert) using an asynchronous delegate should result in twice the number of...
0
by: K.Kishore | last post by:
Hi all, For a ms access database is there any facility like 'commit' like activity to save or not to save records.. to modify/delete changing records. Any vbs code can we do in forms..? -kish
1
by: jefftyzzer | last post by:
Friends: I've written a stored procedure that, among other things, writes several million rows to a declared global temporary table (DGTT) declared as NOT LOGGED using a (cursor) FOR loop. My...
0
by: thebigo | last post by:
Hello I have created an application that writes thousands of records to an MS SQL database. I am performing a Commit statement every 10000 records which keeps the LDF file at a reasonable size. ...
1
by: dbuser | last post by:
Hi I am new to Db2. I am planning to load around 5 million Data using DB2 LOAD utility. Do this utility have an inbuilt COMMIT statement so that i do not get any table locks/deadlock error. ...
4
by: jith87 | last post by:
con = DriverManager.getConnection("jdbc:mysql:///jk","rjk", "sivaji"); con.setAutoCommit(false); java.sql.Statement stmt = con.createStatement(); stmt.executeUpdate("INSERT INTO jk1(fname, lname)...
6
debi148
by: debi148 | last post by:
Hi, I am using Oracle 9i. I am using DML's only. Here I am inserting and updating some records upto say savepoint a. Then I insert and/or update few more records say upto savepoint b. The...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.