Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Resultset Paging

 
ramdas pradeep kumar
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic