executeUpdate returned value
Posted by: Ledion B
Date: May 13, 2005 05:10PM

Hi,

According to the JDBC specifications the executeUpdate(String query), should return the number of values affected (NOT the number of rows that matched)

I am using executeUpdate to do some record locking and it turns out that executeUpdate returns the number of rows matched. Here is what I am using

1. mysql4.1.10-nt
2. mysql-connector-java-3.1.7-bin.jar
3. OS windows XP

and I issue a simple
executeUpdate("UPDATE records set locked=1 where id = 1);

no matter what the locked value is prior to issuing this query the returned value is 1.

Can anyone confirm this? Or do you think of anything I am doing wrong.

Ledion

Options: ReplyQuote


Subject
Written By
Posted
executeUpdate returned value
May 13, 2005 05:10PM


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.