aspose file tools*
The moose likes JDBC and the fly likes executeBatch()  failing for 100 and above Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "executeBatch()  failing for 100 and above" Watch "executeBatch()  failing for 100 and above" New topic
Author

executeBatch() failing for 100 and above

Anand Bhatt
Ranch Hand

Joined: May 30, 2007
Posts: 189
I am tyring to execute 100 records using executeBatch() method of Statement interface.
Upto 99 it is working it fine.

So any idea is there upper limit on number of records to executeBatch method??
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

If I had that problem, I would start by investigating the reasons for the failure. That could include standard debugging techniques like looking at stack traces, for example.
Anand Bhatt
Ranch Hand

Joined: May 30, 2007
Posts: 189
Thanks Paul I am well aware about that, but unfortunately I am not getting any kind of exception/error in log file or console.
As I am reading one .xls file (having 100 plus records) row by row and trying to execute all rows data in single hit by first addBatch and than finally calling executeBatch(String sql),
Ram Narayan.M
Ranch Hand

Joined: Jul 11, 2010
Posts: 247

There would be a possibility of invalid data in 100th record so that its not entered and would be filtrated in validation phase if you have done this...


SCJP 6 [SCJP - Old is Gold]
Anand Bhatt
Ranch Hand

Joined: May 30, 2007
Posts: 189
Hi Ram
There were total of 145 records in that sheet .When I tried to upload in different set(50-50 records per transaction) it is working porperly,It means all records are porper.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: executeBatch() failing for 100 and above