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

N

NickName

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.
 
M

Manish Pandit

NickName said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top