executeBatch returns too many results
Posted by: bwarren
Date: April 22, 2005 09:43AM

I am using executeBatch and I sometimes get too many results for a successful batch update. Based on the javadocs for Statement, the array of update counts that executeBatch returns should be exactly the same size as the number of updates I added with addBatch. This only happens when I execute a single batch update that affects 1 row, and I get back an int array containing {1, 1}. I haven't noticed a pattern where this happens, sometimes it works for the same update and sometimes it doesn't.

Has anyone heard of this before? I have checked and I'm not reusing statements (instances of com.mysql.jdbc.Statement) and I even went so far as to call clearBatch before adding the single update to the statement. The only thing I can guess is that the driver is telling me it executed the update twice.

I'm using the 3.0.11 JDBC driver running in JDK 1.4.1 and the database version is 3.23.38.

Options: ReplyQuote


Subject
Written By
Posted
executeBatch returns too many results
April 22, 2005 09:43AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.