Statement stmt = con.createStatement(
                                      ResultSet.TYPE_SCROLL_INSENSITIVE,
                                      ResultSet.CONCUR_UPDATABLE);
       ResultSet rs = stmt.executeQuery("SELECT a, b FROM TABLE2");
       // rs will be scrollable, will not show changes made by others,
       // and will be updatable
TYPE_SCROLL_INSENSITIVE
public static final int TYPE_SCROLL_INSENSITIVE
The constant indicating the type for a ResultSet object that is scrollable but generally not sensitive to changes made by others. Since: 
1.2 
See Also:
Constant Field Values--------------------------------------------------------------------------------TYPE_SCROLL_SENSITIVE
public static final int TYPE_SCROLL_SENSITIVE
The constant indicating the type for a ResultSet object that is scrollable and generally sensitive to changes made by others. Since: 
1.2 
See Also:
Constant Field Values

解决方案 »

  1.   

    TYPE_FORWARD_ONLY 是只能一个一个的向前移动,不支持绝对定位
      

  2.   

    感谢您帮助我
    可是:Statement stmt = con.createStatement(
                                          ResultSet.TYPE_SCROLL_INSENSITIVE,
                                          ResultSet.CONCUR_UPDATABLE);
    中con是连接数据库的定义类吗??
    为什么我的connectdb中没有方法:createStatement呢??多谢帮助!!
      

  3.   

    con :java.sql.Connection 类的实例
      

  4.   

    ResultSet.TYPE_SCROLL_INSENSITIVE,
     ResultSet.CONCUR_UPDATABLE
    这2个属性加上,如果还不行,JDK版本有问题,更新最高版本