File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Getting next record Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Getting next record" Watch "Getting next record" New topic

Getting next record

Gladys Galeos

Joined: Sep 14, 2003
Posts: 1
I am trying to navigate thru large number of records. I am having problem
with the move-to-next record process. I have a recordid field (unique) but our client requires that records be sorted by their description. Example,
I am currently in recordid 5, when i click on the next button, the next record that will appear may or may not be recordid 6. How will I implement an accurate navigation if my reference id will not be the record id? Any suggestions? Please help!
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
use the 'ORDER BY description' in your SQL statement. The ResultSet represents the order of the SQL query.
I agree. Here's the link:
subject: Getting next record
It's not a secret anymore!