How to get data from a particular row with microsoft jdbc for sql server 2000?

Discussion in 'Java' started by NickName, Oct 26, 2006.

  1. NickName

    NickName Guest

    rs.getString(1) // return data for the first column in the resultset
    rs.getString("LastName") // return data for the column named LastName
    in the resultset

    Now, if I want to return just row 5 of column "LastName", how do we go
    about that?

    rs.getString("LastName").getRow(4)?
    // won't work, for one thing, getRow() method returns row number

    thanks.
     
    NickName, Oct 26, 2006
    #1
    1. Advertising

  2. NickName wrote:

    > Now, if I want to return just row 5 of column "LastName", how do we go
    > about that?


    You can use rs.relative(5) followed by rs.getString("LastName")

    -cheers,
    Manish
     
    Manish Pandit, Oct 26, 2006
    #2
    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. =?Utf-8?B?Z2F1cmF2?=

    Uploading Data From MS Acess 2000 ti SQL server 2000

    =?Utf-8?B?Z2F1cmF2?=, Jan 9, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    849
    Mary Chipman [MSFT]
    Jan 9, 2006
  2. Kevin Munro

    JDBC Drivers SQL Server 2000

    Kevin Munro, Oct 21, 2003, in forum: Java
    Replies:
    0
    Views:
    345
    Kevin Munro
    Oct 21, 2003
  3. mukesh bhakta
    Replies:
    3
    Views:
    7,460
    wm.wragg
    Sep 5, 2006
  4. Replies:
    1
    Views:
    421
    Jerry Stuckle
    May 17, 2006
  5. C Did
    Replies:
    3
    Views:
    4,036
    Chris Lithgow
    Jun 20, 2006
Loading...

Share This Page