JDBC高手請進,百思不得其解的bug
我的一個bean的下面這個方法運行有誤,想了N天不知道怎麼處理,請高手幫忙
=====================================================================
public boolean AuditingApp(int app_no,
String auditing_by,
String auditing_dt,
String rtc_rmk
) throws Exception {
Connection cnn = null;
PreparedStatement prmt = null;
PreparedStatement prmt1 = null;
DataSource das;
boolean lb_ok = true;
int i;
int j;
String sql = "update q_app_register set auditing_by=?, " +
"auditing_dt=?,rtc_rmk=?,app_result=? where app_no = ? ";
String sql2 = "update q_test_register set step = 'O ' where app_no = ? ";
das = getDataSource();
//System.out.println( "sql= "+sql);
try {
cnn = das.getConnection();
prmt = cnn.prepareStatement(sql);
prmt1 = cnn.prepareStatement(sql2);
prmt.setString(1, auditing_by);
prmt.setString(2, auditing_dt);
prmt.setString(3, rtc_rmk);
prmt.setString(4, "2 ");
prmt.setInt(5, app