aspose file tools*
The moose likes JDBC and the fly likes Paging in JDBC 2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Paging in JDBC 2" Watch "Paging in JDBC 2" New topic
Author

Paging in JDBC 2

Armita Bansal
Greenhorn

Joined: Aug 21, 2001
Posts: 8
Is there a provision for paging in JDBC2? I want to retrieve say only rows numbered 20000 to 30000 from a query which will give me a million rows.
ie..
20000-30000 records of the query
"select * from amillionrowtable"
Rob Godfrey
Greenhorn

Joined: Aug 23, 2001
Posts: 2
The JDBC2 spec now offers the ability to jump about in the result set. See methods absolute(), relative(), previous(), first() and last() in the javadoc for java.sql.ResultSet.
Armita Bansal
Greenhorn

Joined: Aug 21, 2001
Posts: 8
Thanks Rob..
but my question is a little different. I can set a fetch Size on the query for the first N rows. but my requirement is a range 10000-20000 row, say. what about this?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Paging in JDBC 2