After executing a Statement which returns a ResultSet, is there any method to call or a way to determine how many rows are contained in the ResultSet without looping through the ResultSet?
I would like to know how many rows are returned prior to processing the ResultSet. TIA
Joined: Oct 31, 2000
Hai, JDBC1.2 API doesnt have this functionality ,where from JDBC2.0 it provides all userfriendly methods which u can access size of the resultset.For JDBC2.0API ,JDBC-ODBC bridge wont support so go for pure Java drivers i.e., thin drivers for Oracle.
SCJP 1.5, SCEA, ICED (287,484,486)
Joined: May 05, 2000
Since the ResultSet doesn't actually contain all the rows (imagine doing a select * on a table with 100 million rows) but goes back to the database to get more rows as needed, I don't believe that the ResultSet has any way of knowing the actual size of the ResultSet. Anil, is there a particular method you had in mind?