How to find out a total # of rows in a ResultSet object??

Hi Guys,

   It seems ResultSet object does not have any member function to find out total number of rows??

stephen
zollenAsked:
Who is Participating?
 
girionisConnect With a Mentor Commented:
 No there is not but you can always move to the last row in the ResultSet by using the last() method and get the count by calling the getRow() method straight after you move to the last row. This will give you the total number of rows. You have to define your ResultSet to be scrollable though (if you want to go back) by using the static TYPE_SCROLL_SENSITIVE.

  Hope it helps.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.