Advertisement
Guest User

update query error. HELP

a guest
Oct 3rd, 2015
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.53 KB | None | 0 0
  1. conn = Connect.ConnectDB();
  2.         String sql = "Update [SoapTbl] set [SoapName] ='"+txtNAME.getText()+"', [SoapQty] ='"+txtQUANTITY.getText()+"', [SoapPrice] ='"+txtPRICE.getText()+"', where [SoapID] ='"+txtID.getText()+"";
  3.        
  4.         try{
  5.             pst = conn.prepareStatement(sql);
  6.             pst.executeUpdate();
  7.             JOptionPane.showMessageDialog(null, "Soap Table has been updated!");
  8.             UpdateSoapTbl();
  9.         }
  10.         catch(Exception e){
  11.             JOptionPane.showMessageDialog(null, e);
  12.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement