Result set type is TYPE_FORWARD_ONLY是说你的结果记录集只向前滚动,你改成这样就可以了
stmt=conn.createStatement();改成
stmt=conn.createStatement(ResultSet.TYPE_SCROLL
_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);

解决方案 »

  1.   

    stmt=conn.createStatement();
    改成下面这句
    stmt = conn.createStatement(
      ResultSet.TYPE_SCROLL_INSENSITIVE,
      ResultSet.CONCUR_READ_ONLY);
      

  2.   

    默认情况下,ResultSet的指针只能向前走,不能后退,也就是说如果有5个数据,你现在取第三个的话,你就不能在回去取第一或第二个数据了。解决办法是:在statement创建时,写成stmt=conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);错误发生在:
    rs.beforeFirst();//Moves the cursor to the front of this ResultSet object, just before the first row.
      

  3.   

    rs.beforeFirst();//Moves the cursor to the front of this ResultSet object, 
    Error.
    if you want a such use,please do as the follows:stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE) ;