Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Fetching Records from CachedRowSet based on pagenum?  RSS feed

 
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: 4093
21
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!