Usually, we are pretty lenient about JDBC discussions as servlets are
usually discussed somewhere in the post, but this is way over that limit
and into a pure JDBC discussion. Please don't use servlet-forum for this
type of post.

.duncan

Danny Ayers wrote:
>
> Hi,
> I've also had some unaccountable SQL truncation errors with
> JDBC-ODBC-SQL Server, but without the termination.
> I don't quite get why you've got the ..."+passwd+"... in there -
> couldn't this go in as another ? ?
>
> Cheers,
> Danny.
> > qian jianhua wrote:
> >
> > 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
>
> --
>
> Intermittent Web site :
> http://members.xoom.com/dayers/_XOOM/dayers/index.html
>
> Alternate email :
> [EMAIL PROTECTED]
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to