|
Actually There is no direct way to get the no of rows in the resultset. I can suggest one way. Make the resultSet scrollable. Then
rs.last
rs.getRow() which will give you the no of the current row.
Or
you can make use of a counter in the while loop
int recordCount =0;
while(rs.next())
{
recordCount++;
}
This will do?
|