File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes addBatch and executeBatch Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JDBC
Reply Bookmark "addBatch and executeBatch" Watch "addBatch and executeBatch" New topic
Author

addBatch and executeBatch

jacq carballo
Ranch Hand

Joined: Feb 10, 2002
Posts: 42
are the addBatch and executeBatch commands thread-safe? i mean, if i have 10 threads adding sql statements to the addBatch methods, and then i suddenly made an executeBatch (after 20 sql statements added to the batch). will the next input to addBatch affect the executeBatch.
for example, if the executeBatch is alrd executing the 20 sql statements and one thread adds 1 sql statement to the addBatch, will the executeBatch execute 21 sql statements or just the 20 sql statements?
tia
jacq
 
 
subject: addBatch and executeBatch
 
Threads others viewed
JDBC addBatch problem
problems with batch update
how to do Batch updates?
JdbcOdbcBatchUpdateException
Can i batch preparedStatements?
MyEclipse, The Clear Choice