最需要注意的是:中文10个字符存数据库通常要20个char()。

解决方案 »

  1.   

    可是我设定的vachar类型是5000,不可能越界的。
      

  2.   

    request.getParameter("content")长度太长,在服务器接收的时候时间太长吧.
      

  3.   

    author =new String (request.getParameter("author").getBytes("ISO-8859-1"),"gb2312");
    title =new String (request.getParameter("title").getBytes("ISO-8859-1"),"gb2312");
    content =new String (request.getParameter("content").getBytes("ISO-8859-1"),"gb2312");
    int id = Integer.parseInt(request.getParameter("id")); sql = "update library_news set title = '"+ title +"', content = '"+ content +"',author = '"+ author +"' where id = "+ id;
    conn.executeUpdate(sql); 这是代码
      

  4.   

    新闻内容到底该怎么接才合理??就用String 吗