Sorry, my following code throws some
SQLException that I can't understand. I wonder who can help me.
Thank you.
The codes are:
String query1= "update customer set
customer_passwd='"+passwd+"',customer_comm='"
+comm_method+"',customer_pwq=?,customer_pwa=? where customer_num="
+num;
PreparedStatement stmt1=con.prepareStatement(query1);
stmt1.setString(1,pwd_question);
stmt1.setString(2,pwd_answer);
int n1=stmt1.executeUpdate();
+comm_method+"',customer_pwq=?,customer_pwa=? where customer_num="
+num;
PreparedStatement stmt1=con.prepareStatement(query1);
stmt1.setString(1,pwd_question);
stmt1.setString(2,pwd_answer);
int n1=stmt1.executeUpdate();
The SQLExceptions are:
SQLException:22001 [Microsoft][ODBC SQL Server Driver][SQL Server]String or
binary data would be truncated. 8152 SQLException:01000 [Microsoft][ODBC SQL
Server Driver][SQL Server]The statement has been terminated. 3621
Qian.
1999.5.5
