-
Mar 23rd, 2012, 02:38 AM
#1
BatchUpdateException with NamedParameterJdbcTemplate.batchUpdate
Hello,
I'm stuck with the following problem and was hoping you guys know a solution.
When I'm executing a batch of insert statements with the NamedParameterJdbcTemplate.batchUpdate I get a DuplicateKeyException because of an IntegrityConstraintViolation. No problem. But I would like to know how many statements of the batch are executed so I can react on this exception.
I'm using Oracle, and in there documentation they speak of a BatchUpdateException who has a method for retrieving the number of succesfully executed statments (int[] getUpdateCounts()).
Any one an idea how I can do this with Spring / NamedParameterJdbcTemplate?
Thanks in advance!
-
Mar 23rd, 2012, 05:22 AM
#2
Hi, see this post, may be useful to you.
-
Mar 26th, 2012, 01:27 AM
#3

Originally Posted by
venosov
Thank you for the link. The problem with there solution is that they do not use the JdbcTemplate from Sping but just old plain Jdbc. I was more hoping the accomplish this with help of Sping but if that is impossible I can use the this solution.
Tags for this Thread
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