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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://www.onjava.com/pub/a/onjava/excerpt/javaentnut_2/index2.html?page=3
this link could be helpful to you
this link could be helpful to you
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__
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__
what you meant by that is to show those records or to actually move there position in the result set? or table?