I am trying to get the row count of a result set by:
rs.last();
int row_count = rs.getRow();
but im getting an Invalid operation for forward only resultset : last
error. The result set is getting its data from an Oracle 10g database.
Here is how i set up my connection:
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);
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…