Accessing record by row number

Reply

Join Date: Jan 2008
Posts: 32
Reputation: eddy556 is an unknown quantity at this point 
Solved Threads: 0
eddy556 eddy556 is offline Offline
Light Poster

Accessing record by row number

 
0
  #1
Feb 22nd, 2008
In a JSP how do I access a record by its number?
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 7,648
Reputation: ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of 
Solved Threads: 474
Super Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Failure as a human

Re: Accessing record by row number

 
0
  #2
Feb 22nd, 2008
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.
I don't accept change; I don't deserve to live.

Jo Tujhe Jagaaye, Nindein Teri Udaaye Khwaab Hai Sachcha Wahi.
Nindon Mein Jo Aaye Jise To Bhul Jaaye Khawab Woh Sachcha Nahi.
Khwaab Ko Raag De, Nind Ko Aag De
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 32
Reputation: eddy556 is an unknown quantity at this point 
Solved Threads: 0
eddy556 eddy556 is offline Offline
Light Poster

Re: Accessing record by row number

 
0
  #3
Feb 22nd, 2008
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
Reply With Quote Quick reply to this message  
Join Date: Aug 2003
Posts: 13
Reputation: dogma is an unknown quantity at this point 
Solved Threads: 0
dogma dogma is offline Offline
Newbie Poster

Re: Accessing record by row number

 
0
  #4
Feb 25th, 2008
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 <c:forEach> 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.
Reply With Quote Quick reply to this message  
Join Date: Aug 2003
Posts: 13
Reputation: dogma is an unknown quantity at this point 
Solved Threads: 0
dogma dogma is offline Offline
Newbie Poster

Re: Accessing record by row number

 
0
  #5
Feb 25th, 2008
Also:
Are you using JSP tags or reverting back to java?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for JSP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC