说什么?
将游标移到第一行前beforeFirst
public void beforeFirst()
throws SQLExceptionMoves the cursor to the front of this ResultSet object, just before the first row. This method has no effect if the result set contains no rows.
Throws:
SQLException - if a database access error occurs or the result set type is TYPE_FORWARD_ONLY
Since:
1.2
将游标移到第一行前beforeFirst
public void beforeFirst()
throws SQLExceptionMoves the cursor to the front of this ResultSet object, just before the first row. This method has no effect if the result set contains no rows.
Throws:
SQLException - if a database access error occurs or the result set type is TYPE_FORWARD_ONLY
Since:
1.2
解决方案 »
- 一道简单面试题!
- 话说偶是JAVA新银 哭求大大们知道啊 我还有救吗??
- 一个小程序
- 一个礼拜都没解决的关于java.swing包下的JTree的第二级节点的问题!
- 如何在Java IDL中传递null参数?
- 请帮忙看看我这的环境变量有啥问题?!!!
- ◆==各位高手,JBuilder环境下,为什么不能单步运行程序?==◆
- 为什么我同一文件,在不同的机器中,从数据库中取出的数据不同,一个变成“????”了呢?
- 有谁能告诉我结果和为什么?感激不尽
- ArrayList类为什么还要实现这个接口,它不已经实现了AbstractList
- JAVA初学者,请教一个关于包的问题
- 听说用jet这个东东可以将Application转换成.exe可执行文件是吗?在那里有下载?
PreparedStatement stmt = connection.prepareStatement(sql, para1, para2);
其中para1和para2可以使用ResultSet类中的常量。
另外,在resultset没有数据的时候,无需调用这个方法,因为resultset默认就是处于这个位置。
对不起,本人新手。
也不知道scrollable 是什么样的接口,请说明,非常感谢!
stmt=con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);