Thanks for that, Paul. I did actually find the GetRows code and was messing
with it, but was confused from the example I had and finally tossed up my
hands and went with the Select query that I'd been using all along. But I
will study your code in comparison with the other one I tried and see if it
makes more sense to me now.

Appreciate it!

Dian D. Chapman, Technical Consultant
Microsoft MVP, MOS Certified
Editor/TechTrax Ezine

Free Tutorials: http://www.mousetrax.com/techtrax
Free Word eBook: http://www.mousetrax.com/books.html
Optimize your business docs: http://www.mousetrax.com/consulting
Learn VBA the easy way: http://www.mousetrax.com/techcourses.html





-----Original Message-----
From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul Manzotti
Sent: Monday, August 08, 2005 3:30 PM
To: [email protected]
Subject: Re: [ASP] How to display specific records

Dian D. Chapman wrote:

>That worked for # 1, but (of course) once it finds the match for # 1, it
>ignores all the rest of the code so the others don't get a display. Select
>case would do the same. I need some code that says "display RS("caption")
>for RS("picNum") = 1 here", "display RS("caption") for RS("picNum") = 2
>here" and so on. But I don't know how I should do this.
>  
>
If you want to have a page with a number of pictures on it, in the SQL 
order by picNum, then loop through the recordset (the usual proviso that 
you should be using arrays and getRows applies here.):

dim i
i = 1
while not rs.bof or not rs.eof
  If RS("picNUM") = i Then
    response.write( RS("caption"))
  end if
  i = i + 1
  rs.movenext
loop

HTH

manzo



---------------------------------------------------------------------    
 Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
 Post       : [email protected]
 Subscribe  : [EMAIL PROTECTED]
 Unsubscribe: [EMAIL PROTECTED]
--------------------------------------------------------------------- 
Yahoo! Groups Links



 




-- 
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.10.2/65 - Release Date: 8/7/2005
 

-- 
This email scanned and certified clean by AVG!
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.10.2/65 - Release Date: 8/7/2005
 



------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12hu7bf4p/M=362131.6882499.7825260.1510227/D=groups/S=1705115381:TM/Y=YAHOO/EXP=1123545208/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life 
- brought to you by One Economy</a>.</font>
--------------------------------------------------------------------~-> 

---------------------------------------------------------------------    
 Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
 Post       : [email protected]
 Subscribe  : [EMAIL PROTECTED]
 Unsubscribe: [EMAIL PROTECTED]
--------------------------------------------------------------------- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/active-server-pages/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to