Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recordset Count Question

Status
Not open for further replies.

gio2888

Technical User
Oct 26, 2000
64
US
Hi, I am trying to display 10 sets of records at once....so this is basically what I am trying to do. At the reponse.write statement, how do I specify the recordset based on the count...like rs1, rs2, rs3...etc? what is the syntax like? Also if my sql statement is select *, then how do I for example return the "title" field of the 8th row in the recordset. Thanks!



count = 0

while not rs.eof and count < 10

response.write rs <----?????
 
that's a pretty broad syntax orientated question or more so answer

first the loop to use
I would use the for as that is more counter orientated
for x = 0 to 10 stuff [smile]

then simple point to the column in which you want
for x = 0 to 10
if x = 8 then
response.write rs(&quot;column name&quot;)
end if
x = x + 1
next

validate EOF of course after the execute of the RS
there's fifty ways to do this really. the best is up to you but the basic pseudo is rate there for you loop through the RS
if counter = 8
write the record
iterate
.............
hope that helps

_____________________________________________________________________
[sub]Where have all my friends gone to????[/sub]
onpnt2.gif

 
How do I know that doing it this way the rs will return the right range...because I am trying to display 10 records at once...so the first set will be 1-10, and then 11-20...etc?
 
now it sounds like you're trying to page the recordset. correct?



_____________________________________________________________________
[sub]Where have all my friends gone to????[/sub]
onpnt2.gif

 
Yea, basically I need to show 10 results per page...and so I need each page to show the correct range. Thanks for the help!
 
still need help...trying to show the correct range...is there a way to say like rs(10), rs(11), rs(12)...etc to show rows 10, 11, 12 and so on?

Is that even right syntax rs(10) equals to the tenth row?


 
Yes, thanks so very very very much...now its time to implement and test!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top