hey im having a little bit of trouble excecuting my update statsments.
I chekd in access directly and am sure that there is no errors in my
SQL.
this is the code i used. The connection is fine its been tested before.
String remove = "UPDATE items SET qty = qty - 1 WHERE store =
'"+from+"' and barcode ='"+barcode+"'";
Statement stmt = null;
try {
stmt = conn01.createStatement();
stmt.executeUpdate(remove);
} catch (SQLException e) {
e.printStackTrace();
}
If anyone knows what the error is it would be greatly appreciated.
thanks
-morc
> hey im having a little bit of trouble excecuting my update statsments.
> I chekd in access directly and am sure that there is no errors in my
[quoted text clipped - 16 lines]
> If anyone knows what the error is it would be greatly appreciated.
> thanks
See
http://riters.com/JINX/index.cgi/Suggestions_20for_20Asking_20Questions_20on_20N
ewsgroups#RepeatErrorsExactly
Also, you're leaving yourself vulnerable to SQL injection attacks. See
http://nebupookins.net/entry.php?id=334 You'll probably want to google for
"Prepared Statements".
- Oliver