P.S,我在JSP调用resultset.previous返回如下错误:[Microsoft][SQLServer 2000 Driver for JDBC]Unsupported method: ResultSet.previous

解决方案 »

  1.   

    P.S:我在JSP调用resultset.previous返回如下错误:[Microsoft][SQLServer 2000 Driver for JDBC]Unsupported method: ResultSet.previous
      

  2.   

    为什么一定要得到结果集以后再取上一条记录,不能直接用SQL得到吗?
      

  3.   

    微软的JDBC版本比较低,好象不行.而且要读前一条记录,需要打开游标
      

  4.   

    用jtds呢?这个没试过,一般不会用到往前的吧
      

  5.   

    from java doc:
    A default ResultSet object is not updatable and has a cursor that moves forward only. Thus, you can iterate through it only once and only from the first row to the last row. It is possible to produce ResultSet objects that are scrollable and/or updatable. The following code fragment, in which con is a valid Connection object, illustrates how to make a result set that is scrollable and insensitive to updates by others, and that is updatable. See ResultSet fields for other options. 
           Statement stmt = con.createStatement(
                                          ResultSet.TYPE_SCROLL_INSENSITIVE,
                                          ResultSet.CONCUR_UPDATABLE);
           ResultSet rs = stmt.executeQuery("SELECT a, b FROM TABLE2");