Mysql/JDBC update query problem
Hi
I am trying to make an update query for java jdbc/mysql.
The query runs as follows:-
result = statement.executeUpdate("update account set balance = balance - " + amountToWithdraw +
" where account.account_number = '" + accountNumber + "'" + "and account.sortcode = " + "'"+sortCode+"'");
I keep getting the error message:-
Account.java:126: incompatible types
found : int
required: java.sql.ResultSet
result = statement.executeUpdate("update account set balance = balance - " + amountToWithdraw +
^
1 error
I know that the syntax is correct because I have it working in mysql, I dont quite know what this means.
Any help would be appreciated
theLinuxGuy