aspose file tools*
The moose likes JDBC and the fly likes How Do I get Previous record as like Next ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How Do I get Previous record as like Next ?" Watch "How Do I get Previous record as like Next ?" New topic
Author

How Do I get Previous record as like Next ?

Arockiaraj Swaminathan
Greenhorn

Joined: Jan 20, 2001
Posts: 12
Dear All!
I have retrieved data form the Database. I want to give Search Utility to move back and forth to view the record. I have given to move the record to Next, but I could not get done for previous record. How do I get it?
------------------
S Arockiaraj


S Arockiaraj
Peter Tran
Bartender

Joined: Jan 02, 2001
Posts: 783
You need to look into scrollable result set. I think the default result set is a forward only cursor. I haven't used a Scrollable result set because the performance is pretty bad (from what I've read). You might want to look into putting the data into a collection and going through the collection rather than using a scrollable result set.
Sameer Sawla
Greenhorn

Joined: Nov 24, 2000
Posts: 8
If you are using [B]JDBC 3.0[B] then RecordSet.previous() method can also be used.
 
Don't get me started about those stupid light bulbs.
 
subject: How Do I get Previous record as like Next ?