Output data

Discussion in 'Java' started by teser3@hotmail.com, Jul 7, 2008.

  1. Guest

    I have something that works with data mapping but was wondering if
    there was a more efficient way to do this?

    Java part:
    .....
    //database part here...ResultSet rs
    ....

    List myMap = new ArrayList();

    while (rs.next())
    {
    String firstname = rs.getString("firstname");
    String lastname = rs.getString("lastname");
    String address = rs.getString("address");
    myMap.add(firstname + "," + lastname + "," + address);
    }

    -----

    output:
    //output comma delimeter data
    out.print(myMap.get(0));


    Please advise.
    , Jul 7, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Bentley

    Output / Debug window output bug?

    John Bentley, Sep 10, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    579
    John Bentley
    Sep 10, 2003
  2. chuck amadi
    Replies:
    1
    Views:
    477
    Larry Bates
    Jun 23, 2004
  3. Paul
    Replies:
    1
    Views:
    424
  4. Stephen Moon

    reading output file data as input data

    Stephen Moon, Feb 28, 2004, in forum: Perl Misc
    Replies:
    5
    Views:
    161
    Tad McClellan
    Feb 29, 2004
  5. Replies:
    4
    Views:
    228
    Paul Lalli
    Aug 1, 2007
Loading...

Share This Page