• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Pagination Issue

 
kishore kovil
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Currently , I'm dealing with pagination .
I'm tryiing to do it by query.
but,i'm n't successful.
Pls. help me.

code:
______

My query is:
String query = "Select * from (Select a.*, rownum rnum From (select * from "
+ TableDetails
+ " order by rowid desc)a where rownum <= "
+ (recordsPerPage * (Integer.parseInt(pageNumber)))
+ ") where rnum >"
+ (recordsPerPage * ((Integer.parseInt(pageNumber) - 1)))
+ "";

with this query,
I'm not able to get all the results.
I'm missing some records.(say, missing 2 of 6)
I mean, this is working fine for Next button in jsp , but not for Previous button.

How can i modify the query?


Pls help me.


Thanks,
Kishore
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34396
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kishore,
First, try printing out the query. Are the indices what you expect?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic