moving record in resultset

Posted on 2006-05-10
Last Modified: 2012-05-05
Hi all,
I want to show data in my table then move record to first, next, previous, last. How can I do that?

Question by:sdieken
    LVL 23

    Accepted Solution


    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.
    LVL 23

    Expert Comment

    >>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?
    LVL 8

    Expert Comment

    LVL 8

    Expert Comment

    To move about the resultset object:

    ResultSet rs = ...;

    rs.first(); // move to first; // 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.


    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Suggested Solutions

    For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
    Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
    The viewer will learn how to implement Singleton Design Pattern in Java.
    This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now