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
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
可是:Statement stmt = con.createStatement(
ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_UPDATABLE);
中con是连接数据库的定义类吗??
为什么我的connectdb中没有方法:createStatement呢??多谢帮助!!
ResultSet.CONCUR_UPDATABLE
这2个属性加上,如果还不行,JDK版本有问题,更新最高版本