File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 Android Security Essentials Live Lessons this week in the Android 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
 
Similar Threads
JPQL Query Paging
Clarifications on session attribute
Paging
Tax Planning for the fiancial year 2005-06
Reading ResultSet data Batch Wise