你的wtp是什么?PreparedStatement类的对象的executeUpdate()返回的好像是整形的数值,
因为编码方式的不同会出现乱码问题,你可以用java.lang包的String类的构造方法String(byte[] bytes, String enc)来加以转换。参考以下解释:String
public String(byte[] bytes,
              String enc)
       throws UnsupportedEncodingException
Construct a new String by converting the specified array of bytes using the specified character encoding. The length of the new String is a function of the encoding, and hence may not be equal to the length of the byte array.
Parameters:
bytes - The bytes to be converted into characters
enc - The name of a supported character encoding
Throws:
UnsupportedEncodingException - If the named encoding is not supported

解决方案 »

  1.   

    问题的关键上在做数据库更新时RESIN提示有语法错误(当然页面没有问题)更新数据如是中文就出错如只更新一个中文就OK.插入操作时只能插一不分中文.中文显示没有问题查询也没有问题.
      

  2.   

    try this :
    String idd= new String(request.getParameter("T1").getBytes("8859_1"),"gb2312");
      

  3.   

    一群闲人,我也曾经问过很多这个问题,以前我使用的jsp服务器是resin,使用过7中解决方法。最后得出的结论是换个服务器,使用Jrun、tomcat、websphere都可以解决数据库插入中文问题。
      

  4.   

    wtpxl,resin显示中文真的没有问题吗?你试一下显示数据库中的“销售”两个字。