【发布时间】:2012-02-18 21:26:08
【问题描述】:
我正在尝试通过以下方式获取结果集的行数:
rs.last();
int row_count = rs.getRow();
但我收到Invalid operation for forward only resultset : last 错误。结果集从 Oracle 10g 数据库中获取数据。
这是我设置连接的方式:
Class.forName("oracle.jdbc.driver.OracleDriver");
String connectionString = "jdbc:oracle:thin:@" + oracle_ip_address + ":" + oracle_db_port + ":" + oracle_db_sid;
Connection conn = DriverManager.getConnection(connectionString, oracle_db_username, oracle_db_password);
【问题讨论】:
标签: java oracle jdbc resultset