ExecuteBatch for update qry giving resultant array having all elements as "-2"
Posted on 2004-10-27
I am using PreparedStatement and executeBatch() method to update my DB.
In a batach I have 100 update queries approx.
In some situation the where clause does'nt get satisfied and resulting in 0 rows updated.
even in that situation my executeBatch call gives result in int array filled up of -2(means no info about update).
Is there any othey way to find the update counts in JDBC.( I have to use PreparedStmts only .simple Statement is not allowed as per my guidelines)
your help will be aprreciated with A grade if works fine!!!!!