• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

batchupdate is not updating 1071 updates Urgent help required

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic