在生成stmt的时候,应该加个什么参数吧,查查.

解决方案 »

  1.   

    创建statement时,不要在其中设置TYPE_FORWARD_ONLY!
      

  2.   

    用下面的方法生成stmt试试:
    con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
      

  3.   

    last
    public boolean last()
                 throws SQLExceptionMoves the cursor to the last row in this ResultSet object. Returns:
    true if the cursor is on a valid row; false if there are no rows in the result set 
    Throws: 
    SQLException - if a database access error occurs or the result set type is TYPE_FORWARD_ONLY