Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Fetching Records from CachedRowSet based on pagenum?

 
amarshi mohanty
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I need to display the records 15 per page and the pages are max 3000.
So i need to use prev and next concept.But how to pass the the page num values to the cachedrowset object?
Everytime its displaying all the records available in the resultset.

crs.populate(rs);
crs.setPageSize(20);
crs.setMaxRows(15);

Thanks
Amarshi



 
Scott Selikoff
author
Bartender
Posts: 4033
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Call populate() after setting the size and maxRows. Also, maxRow should probably be greater than pageSize.
 
amarshi mohanty
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks It worked as you said.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!