Upadate all queries in executeBatch

Hi,

I am trying to insert bulk records into table using addBatch & executeBatch. while inserting through executeBatch if any one of records throws exception remaing records are not updated (for example if i am inserting 10 records if 5th record fails to insert into table i want remaining 6 to 10 records to be inserted into the table. so that except failed record all other records needs to be inserted). Is it possible using executeBatch? if possible please give a sample code.

Thanks

Prasad

[522 byte] By [prasadmcaa] at [2007-11-27 11:40:07]
# 1

Whether the batch continues or not is Driver specific. Ask the DB company.

From the API

If one of the commands in a batch update fails to execute properly, this method throws a BatchUpdateException, and a JDBC driver may or may not continue to process the remaining commands in the batch. However, the driver's behavior must be consistent with a particular DBMS, either always continuing to process commands or never continuing to process commands.

masijade.a at 2007-7-29 17:30:01 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...