Link to home
Start Free TrialLog in
Avatar of sdieken
sdieken

asked on

moving record in resultset

Hi all,
I want to show data in my table then move record to first, next, previous, last. How can I do that?

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Siva Prasanna Kumar
Siva Prasanna Kumar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>>then move record to first, next, previous, last

what you meant by that is to show those records or to actually move there position in the result set? or table?
Avatar of colr__
colr__

To move about the resultset object:

ResultSet rs = ...;

rs.first(); // move to first
rs.next(); // move to next (returns boolean wether there is a next or not)
rs.last(); // move to last
rs.getRow(); // get the current row number

There isnt a 'previous' method as far as Im aware - youd need to strat at the first and cylce through them all until you get to the end.

colr__