Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
    Bookmark Topic Watch Topic
  • New Topic

Pagination to fetch batch of records

 
Rithanya Laxmi
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi,

I am looking for a pagination to setup in our application which fetches 100 records per page click, please let me know how I can proceed with it :-

I want to build a pagination by fetching the records in small batches in java using JDBC with Oracle 11g DB , I am using the below query :-

Select * from (Select * from <tablename> where <condition> order by id) where rownum > ? and rownum < ?

Please let me know how can get the values in small batches in java? I have set the batchsize as 100. Hence it will fetch 1 - 100 records, how I can get the next set of records like 101-200, 201-300, 301-400, etc. How I can write the incremental logic in java to get the next set of batches? Please provide some examples on this which will be of great help.

Thanks.
 
Tapas Chand
Ranch Hand
Posts: 583
8
BSD Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Report post to moderator
duplicate of this
 
Paul Clapham
Sheriff
Posts: 21572
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Report post to moderator
Thanks; this post locked.
 
    Bookmark Topic Watch Topic
  • New Topic