954,568 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Accessing record by row number

In a JSP how do I access a record by its number?

eddy556
Light Poster
32 posts since Jan 2008
Reputation Points: 10
Solved Threads: 0
 

Which record are you talking about anyways? Please make an attempt to at least specify the exact nature of your problem as explicitly as possible instead of letting the one helping you out to do all the thinking.

~s.o.s~
Failure as a human
Administrator
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 734
 

Sorry. I have a JSP which accesses an Access database and prints its records to screen. What I want to be able to do is to access the records and print them by there row number in the record set. Something along the lines of:

rs.Record[1]
rs.Record[2]
rs.Record[3]

..and so on.

Thanks for your help

eddy556
Light Poster
32 posts since Jan 2008
Reputation Points: 10
Solved Threads: 0
 

You can only use data that is in the table. All other data is artificial. You could use a for loop (or something like a with an incremental variable) the numbers though are not tied to each record. I.E. record 0 is only ever the first record you retrieve not the primary key or an identifier of the data.

You won't be able to use this to update records etc.

dogma
Newbie Poster
14 posts since Aug 2003
Reputation Points: 10
Solved Threads: 0
 

Also:
Are you using JSP tags or reverting back to java?

dogma
Newbie Poster
14 posts since Aug 2003
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You