aspose file tools*
The moose likes JDBC and the fly likes batchupdate is not updating 1071 updates Urgent help required Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "batchupdate is not updating 1071 updates Urgent help required" Watch "batchupdate is not updating 1071 updates Urgent help required" New topic
Author

batchupdate is not updating 1071 updates Urgent help required

sowmya vasisht
Ranch Hand

Joined: Aug 23, 2001
Posts: 35
Hi,
I have a problem, i am reading some records from a file and updating to DB,But, if there are less number of records i am able to update and insert, but if there are large number of records then it is not updating to DB, but executeBatch() method is returning an array of int of updates, but those records are not reflected in DB.
Can anybody please tel me what would have gone wrong. i am using createstatement(type_scroll_insensitive, resultset.concurreadonly), and I am using Statement to update the batch.
It is not even throwing any exceptions,
Thanx in advance
sowmya
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
Based on the information you give us it could perhaps be a driver bug, but you're not telling us what database or driver you're using.
- Peter
sowmya vasisht
Ranch Hand

Joined: Aug 23, 2001
Posts: 35
Hi,
thanx for the response,
I am using, JDBC ODBC,
connecting to a MS SQL DB,
Could you please let me know , waht might be the problem,
I am updating and inserting in different tables together.
The code goes like this.
.....
for()
{...
String ls_query1 = "insert into table2...."
String ls_query2 = "update table1...."
String ls_query3 = "update table3...."
Statemetn.addBatch(ls_query1 )
Statemetn.addBatch(ls_query3 )
Statemetn.addBatch(ls_query2 )
}
Statemetn.executeBatch();
thanx in advance,
somwya
 
jQuery in Action, 2nd edition
 
subject: batchupdate is not updating 1071 updates Urgent help required