Thank you for your time.
But I am not trying to put a too long string in a Text field. And I haven't find the solution yet. If you have, please let me know.
Thanks a lot.
 
Qian
1999.5.7
-----Original Message-----
������: Balogh Andras <[EMAIL PROTECTED]>
�ռ���: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
����: 1999��5��6�� 22:21
����: Re: SQLException

I think your error means that you try to put in a Text field more than it is possible ( 8152 chars).
I think or the pwd_question or the pwd_answer is too long.
 
I am not sure about this :)))
 
p.s. Sorry if i misunderstood your problem
 
Best wishes,
                    Andras
 
 
-----Original Message-----
From: qian jianhua <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Thursday, May 06, 1999 4:04 PM
Subject: SQLException

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();
 
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

Reply via email to