I seriously need your help with JDBC !!!
Hi,
I'm currently developing a java application that accesses a Microsoft Access database. I used prepared statement to insert a new record in a particular table and it works. The problem is that when I tried to update a record in that table with a prepared statement, a "driver not capable " SQL exception appeared.
PreparedStatement creditBalance = con.prepareStatement(
"UPDATE Accounts SET Balance = Balance + ? WHERE AccountNumber = ?");
creditBalance.setLong(1, addMoney);
creditBalance.setLong(2, 2022333);
creditBalance.executeUpdate();
When I did the same thing with a standard statement (Statement object) and it gave me " too few parameters, expected 1" SQL exception.
Statement stmt = con.createStatement();
String creditString = "UPDATE Accounts " + "SET
Balance = Balance + addMoney "
+ "WHERE AccountNumber =
2022333";
stmt.executeUpdate(creditString);
Does any one knows how can I solve this problem (I need it urgently please !!!)
Many thanks

