L
lalalala
public boolean addItem(String barcode, String style, String colour,
String size, String qty, String store){
boolean complete = false;
String addItem = "INSERT INTO items (barcode, style, colour, size,
qty, store) VALUES
('"+barcode+"','"+style+"','"+colour+"','"+size+"','"+qty+"','"+store+"')";
Statement stmnt = null;
System.out.println(addItem);
try {
stmnt = conn01.createStatement();
stmnt.executeUpdate(addItem);
//stmnt.execute(addItem);
complete = true;
} catch (SQLException e) {
e.printStackTrace();
}
return complete;
}
-----The statement works but the executeUpdate isnt updating the
database, when i use the same query directly in access it works and the
connection works for other queries, that modify the information of an
already existant row of information, but for this im not getting any
errors its just not updating my database.
Any ideas on what it could be?
Any help would be greatly appreciated.
Thank you, and ignore last message i fixed that problem
String size, String qty, String store){
boolean complete = false;
String addItem = "INSERT INTO items (barcode, style, colour, size,
qty, store) VALUES
('"+barcode+"','"+style+"','"+colour+"','"+size+"','"+qty+"','"+store+"')";
Statement stmnt = null;
System.out.println(addItem);
try {
stmnt = conn01.createStatement();
stmnt.executeUpdate(addItem);
//stmnt.execute(addItem);
complete = true;
} catch (SQLException e) {
e.printStackTrace();
}
return complete;
}
-----The statement works but the executeUpdate isnt updating the
database, when i use the same query directly in access it works and the
connection works for other queries, that modify the information of an
already existant row of information, but for this im not getting any
errors its just not updating my database.
Any ideas on what it could be?
Any help would be greatly appreciated.
Thank you, and ignore last message i fixed that problem