• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Pagination Issue

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Kishore,
First, try printing out the query. Are the indices what you expect?
 
Time is the best teacher, but unfortunately, it kills all of its students - Robin Williams. tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic