看看sql语句有错没??可以单独执行一下看看。

解决方案 »

  1.   

    我把执行后的SQL语句打印出来放在查询分析器中执行了,都没有问题呀!
    所以怪!
    我觉得问题在JSP上,但,我看不出哪有毛病!!
    快,帮我呀,真急人
      

  2.   

    try{
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    String url="jdbc:odbc:cpic";
    Connection con=DriverManager.getConnection(url,"sa","");

    PreparedStatement updateacc;
    String strSQL="UPDATE userinfo SET  passw=? where usern='"+usern+"'"; 
             updateacc = con.prepareStatement(strSQL);
          updateacc.setString(1, pass); 

          updateacc.executeUpdate();
        response.sendRedirect("usercharge.jsp");
    con.close();

    }catch(Exception e) 
    {out.println(e);}
    稍微改一下吧
      

  3.   

    我用过tomcat下出现这样的情况,记录更新了,但是有延迟,会卡主!然后关掉服务就执行了。