rs.deleteRow(); 是jdbc2.0中ResultSet的方法。Statement st = connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,       ResultSet.CONCUR_UPDATABLE);

解决方案 »

  1.   

    public void deleteRow()
    Deletes the current row from this ResultSet object and from the underlying database. This method cannot be called when the cursor is on the insert row. 
      

  2.   

    pei_yanni,你写的不是doc里的东西么,怎么了?我觉得我用的时候游标并不是在插入行啊?
    andrawu,你写的是什么意思呢?
      

  3.   

    Andrawu让你创建Statement 的时候注意两个参数的使用
      

  4.   

    Statement st = connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
      ResultSet rs = st.executeQuery(sqlString);  /**
       * This method deletes nth Row from the result Set
       */
      public void deleteNthRow(ResultSet rs,int rowNum) throws SQLException {
        rs.absolute(rowNum);
        rs.deleteRow();
      }