any way to find no of rows in resultset

is there any way to find no of rows in resultset without looping through it
[89 byte] By [parul_patidar] at [2007-9-26 6:23:18]
# 1
Hirs.getFetchSize();
ramau at 2007-7-1 15:24:26 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 2
>rs.getFetchSize();r u sure i thought it is for getting limit of rsultset objecti.e. it indicate max no of rows a rsultset object can contain
parul_patidar at 2007-7-1 15:24:26 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 3

You are correct, rs.getFetchSize() does not give you the number of records in the result set. You are also correct that reading the entire result set is the only reliable way of counting its records. However, this question has been asked hundreds of times before, so I am simply going to suggest you search the forums for it, instead of going through all of that all over again.

DrClap at 2007-7-1 15:24:26 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 4
thank u all for reply
parul_patidar at 2007-7-1 15:24:26 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...