This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
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

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
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!