Hi kel,
Whats the error you are facing when u try to update?
as of your below database steps,
qty = qtytext.getText();
total = totaltxt.getText();
rs = salesmade.executeQuery("SELECT * FROM Stock WHERE ITEM = "+'"+itemno+"'");
While (rs.next())
{
salesno = itemtxt.getString(itemno);
salesmade.executeUpdate("UPDATE Stock SET Total= "+total+" WHERE ITEM ="+itemno+"");
}
as you said its fine with apstrophes b/c you just wrote it by hand for explaining it ,and hope u also
meant itemtxt = rs in your code.
Are you atleast able to fetch the results using the Select statement?
if so check out the privilages for the database user u are using .it may not have the update privilages for the table you r accessing .
or else
Remove the update statement from the while loop and run it seperately and
test it.
Raj