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
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