updation prob..........
i have an jsp page which is used to update the two tables named
1) pay_header 2) pay_detail.
In which the values of chq_amt of table 1 should be equal to values of db_amt of table 2.
i have used the following query:
PreparedStatement pstatement = conn.prepareStatement(
"UPDATE pay_header,pay_detail SET pay_header.chq_amt=pay_detail.db_amt where pay_header.vou_no = pay_detail.vou_no");
pstatement.setFloat(1,Float.parseFloat(request.get Parameter("chq_amt")));
pstatement.setFloat(2,Float.parseFloat(request.get Parameter("db_amt")));
pstatement.setString(3,request.getParameter("vou_n o"));
int rowCount = pstatement.executeUpdate();
conn.setAutoCommit(false);
conn.setAutoCommit(true);
its coming error
help
|