mysql里的问题。 
一个Statement只可以对应一个ResultSet.
By default, only one ResultSet object per Statement object can be open at the same time. Therefore, if the reading of one ResultSet object is interleaved with the reading of another, each must have been generated by different Statement objects. All execution methods in the Statement interface implicitly close a statment's current ResultSet object if an open one exists. from jdk1.4.1 api doc<转载>

解决方案 »

  1.   

    但是我的代码里就是只用到一次ResultSet异常是这个:
    javax.servlet.ServletException: [Microsoft][ODBC SQL Server Driver]????????? hstmt
    哪位知道的教教我啊,我真的很痛苦.....
      

  2.   

    没人回吗?
    做过asp或者jsp的都会碰到啊,我第一次做,帮帮我吧!我等
      

  3.   

    数据类型不一致
    String plus="update bbsMSG set replyNum='"+num+"',appTime=getDate() where id='"+msgID+"'";
    replyNum到底是int还是string?
      

  4.   

    指针问题。你的connection 用的是什么连接方法???
    stmt = conn.createStatement(
                                            ResultSet.TYPE_SCROLL_INSENSITIVE,
                                            ResultSet.CONCUR_READ_ONLY
                                            );
    如果rs没有记录,你也会发生例外。
      

  5.   

    rs.next();int num=rs.getInt("replyNum");
    num+=1;rs.close();int num=0;
    if(rs.next())
    {
    num=rs.getInt("replyNum");
    num+=1;
    }
    rs.close();