hello everyone i'm student from the philippines and i have a problem with my projects. i'm new to this forum and i'm looking for someone who can help me with the code right here. i copy this code from my other update button that is working but this one is not working. i don't know what the problem. there is no error found but when i try to click the update it will direct me to the unable to update message. thanks in advance.




heres the code:


*// con = Connections.getConnection();
*// String UpdateQuery = null;
*// PreparedStatement ps = null;


*// try{
UpdateQuery = "UPDATE inv_products SET Products_name = ?, Brand = ?, Category = ?, Description = ?, Store_QTY = ?,
*// Warehouse_QTY = ?, srp = ?, Price = ? WHERE id = ?";
*// ps = con.prepareStatement(UpdateQuery);
*// ps.setString(1, pn.getText());
*// ps.setString(2, brand.getText());
*// ps.setString(3, cat.getText());
*// ps.setString(4, desc.getText());
*// ps.setString(5, sqty.getText());
*// ps.setString(6, wqty.getText());
*// ps.setString(7, srp.getText());
*// ps.setString(8, pri.getText());

*// ps.setInt(9, Integer.parseInt(id.getText()));

*// ps.executeUpdate();
*// Display_on_Table();
*// UpdateProductLog();

*// JOptionPane.showMessageDialog(rootPane, "Product is Updated");

*// }catch (SQLException ex){

*// JOptionPane.showMessageDialog(rootPane, "Unable to Update");
}
}

>>> i'm using java netbeans 8.2