This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes Resultset Paging Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Resultset Paging " Watch "Resultset Paging " New topic
Author

Resultset Paging

ramdas pradeep kumar
Ranch Hand

Joined: Aug 27, 2003
Posts: 36
Hai friends,
How paging can be implemented in a resultset. I want to list the records by a page size of 10. Is it possible with Java.
Sanjeev Kaushik
Ranch Hand

Joined: Aug 01, 2002
Posts: 105
You can try ScrollableResultset
Here are few links which can help you
http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/jdbc20/ScrollableResSetSample/Readme.html
http://otn.oracle.com/sample_code/tech/java/codesnippet/jdbc/rs/CountResult.html
Another way could be using Statement objects setMaxRows(no. of records you need)
You can use the boundary conditions in the sql query as per your DB and you will that many no of records only.
Hope it can guide you!
Sanjeev Kaushik


Sanjeev Kaushik
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Resultset Paging
 
Similar Threads
ResultSet Paging --- I am STUCK!!!!!!
How does servlet know which url to open?
How to retrieve 1 million records in DB2 and write to a file?
How to do Paging in struts
How paging by JDBC ?