File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Determine Rows in a ResultSet?

 
Amond Adams
Ranch Hand
Posts: 62
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Dudes,
Lets say stmt.setFetchSize(100) is executed and then ResultSet forms as a reult of a executeQuery() not if the query only returned 10 or 20 rows, whats the cleanist way to determine the actual number of rows present in the ResultSet at any valid instance.
Love and Peace.
 
Rani Mukherjee
Greenhorn
Posts: 24
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Amond,
I asked similar quest & found answer in same forum. You can view this at http://www.javaranch.com/ubb/Forum3/HTML/000494.html
Rani
 
Bhupinder Dhillon
Ranch Hand
Posts: 124
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could create a scrollable result set and jump to the last row and call getRow() method which returns the number of the current row (in this case last row).
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic