File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

batchupdate is not updating 1071 updates Urgent help required

 
sowmya vasisht
Ranch Hand
Posts: 35
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3252
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 35
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic