-
Jul 8th, 2009, 08:56 AM
#1
JDBC Batch Update
Hi,
I'm trying to insert records in a table using batchUpdate method of JdbcTemplate. In some cases the operation may fail - due to unique key constraint for example.
In such cases I would like the method either:
1. skip the problematic items, complete inserting the remaining items and return something to convey which records where inserted/not inserted.
or
2. return the index of the first item that failed or something to identify the first problematic record.
batchUpdate does returns an array of the number of rows affected by each statement, however in case of an exception as the one mentioned above, one doesn't get this information.
Please let me know if there is any way to accomplish this.
Regards,
Priyank
Regards,
Priyank
-
Jul 16th, 2009, 10:14 AM
#2
I have the exact same question myself.
Does anyone have any suggestions for us to try?
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules