• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 366
  • Last Modified:

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?

  • 2
1 Solution
Siva Prasanna KumarPrincipal Solutions ArchitectCommented:

check out the above it has with examples of various things you can do on database using java with examples.

check out reteriving data session in particular that will solve your task.


here is one more good site with working examples.

Thank You.
Siva Prasanna KumarPrincipal Solutions ArchitectCommented:
>>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?
Manikandan ThiagarajanSenior consultantCommented:
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now