Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ExecuteBatch inside while loop, problem!!!

843854Nov 2 2004 — edited Nov 3 2004
I'm trying to run an executeBatch command inside a while loop that gets parameters from a resultSet. When a certain amount of commands have been added (1000) I want to execute the batch, and then continue adding commands and executing in batches of 1000 commands. The problem is the executeBatch doesn?t run at all, the app just stops dead it seems to get locked executing the batch. If I add all the commands from de resultSet and run executeBatch at the end, outside of the while loop, it works, but I run the risk of sending too many commands to the Database (Sybase 12.5). Any advice on how to achieve this? Thanks a lot
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 1 2004
Added on Nov 2 2004
3 comments
655 views