Dian, 

Here's some explanation of my pseudocode: 

Get PhotoRS("Select * from Photos")
        -Connect to the database
        -create the recordset
        -populate the recordset with the photos query
Get CurrentPhotoID
        -inside the PhotoRS loop, this line gets the current photoID from the recordset
Get CaptionRS("Select * from Captions where PhotoID = " &
CurrentPhotoID)
        -creates the caption recordset
        -populates the caption recrodset based on the current photoid
Get Caption/Print Caption
        -Gets the current caption info from the caption Recordset
        -Outputs/Renders the current caption to the screen or a string variable

Note: I forgot to add the CaptionRS.movenext in my pseudocode, which must be in there 
or else it'll loop forever. 

Also don't forget to close the database connection after all is done.

Hope that helps!

Good luck!

-Matias 

-----Original Message-----
From: Dian Chapman [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 22, 2004 10:41 AM
To: [EMAIL PROTECTED]
Subject: RE: [ASP] Well, THAT's not gonna work!

Sorry, but I guess I don't understand this well enough, cos' I can't get it working 
and don't understand why...what it's doing.

Can someone explain GET to me? I can't find much info on it in any of my ASP books.

TIA...
Dian ~


-----Original Message-----
From: Dian Chapman [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 22, 2004 2:05 AM
To: [EMAIL PROTECTED]
Subject: RE: [ASP] Well, THAT's not gonna work!

Thanks! I'll give this a shot. 


Dian ~


-----Original Message-----
From: Mat�as Ni�o ListMail [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 22, 2004 4:21 AM
To: [EMAIL PROTECTED]
Subject: RE: [ASP] Well, THAT's not gonna work!

Dian, 

I would just loop through the photos and run a caption query for each photo.


For instance...

Get PhotoRS("Select * from Photos")
Do while not PhotoRS.eof
        Get CurrentPhotoID
        Get CaptionRS("Select * from Captions where PhotoID = " &
CurrentPhotoID)
        Do while not CaptionRS.eof
                Get Caption
                Print Caption
        Loop
        PhotoRS.movenext
Loop

Alternately you can query all photos and all captions into data sets or arrays and 
sort them out for printing.

Hope that helps,
Matias 

-----Original Message-----
From: Dian Chapman [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 22, 2004 2:09 AM
To: Group - ASP
Subject: [ASP] Well, THAT's not gonna work!

Hi folks...

I was just working away on a fun, little project...thinking what I wanted to do would 
be easy...when I realize that what I was thinking was totally off the mark! Now I 
can't think of how to do this simple thing...that, apparently, might not be simple? 

Scenario...a simple Access DB with two tables. One for Pictures w/ID, PictureNum. The 
second table is Captions w/ID, PictureNum, Captions.

All I was hoping to do was allow staff to insert captions to some party pics I just 
got, submit the captions to a DB and then have the page regenerate, pulling all the 
captions and tossing them through a loop under each photo.

The problem is that there are 50 pics and each caption has to be set to fall under the 
correct photo. I have the query pulling everything from the two tables with the 
PictureNum being the match for the tables...but when I moved to the first pic and 
started to add the <%=RS(.... code, I realize...so how the hell do I do this?

And for ONCE I have the quotes right.<g> Cos' the page is coming out okay, but, of 
course, I'm getting ALL the captions under all the pictures. So I'm not pulling the 
individual number correctly...in fact, I have NO IDEA how/if I can do this??? 

How can I pull all the captions for Pic # 1 and loop them in this cell...and all the 
captions for # 2 and loop them in that cell???

Here's the query:

RS.Open "SELECT * FROM Pictures, Captions WHERE Pictures.ID=Captions.PictureNum", 
Conn, 1, 3

And here's the insert code I have so far...which isn't right....

<%If RS("Captions.PictureNum") = 1 Then
        Do Until RS.EOF
                Response.Write("<span
class='sanserifTextBLUEMedBoldCopy'><b>Caption: </b></span>") &
RS("Caption") & ("<br>")
                RS.MoveNext
        Loop
End If%>

TIA for any help...

Dian ~



        

 


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.722 / Virus Database: 478 - Release Date: 7/18/2004
 



------------------------ Yahoo! Groups Sponsor --------------------~--> Yahoo! Domains 
- Claim yours for only $14.70 http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/17folB/TM
--------------------------------------------------------------------~-> 

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



 



------------------------ Yahoo! Groups Sponsor --------------------~--> Yahoo! Domains 
- Claim yours for only $14.70 http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/17folB/TM
--------------------------------------------------------------------~-> 

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



 


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.722 / Virus Database: 478 - Release Date: 7/18/2004
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.722 / Virus Database: 478 - Release Date: 7/18/2004
 



------------------------ Yahoo! Groups Sponsor --------------------~--> Make a clean 
sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/17folB/TM
--------------------------------------------------------------------~-> 

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



 


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.722 / Virus Database: 478 - Release Date: 7/18/2004
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.722 / Virus Database: 478 - Release Date: 7/18/2004
 



------------------------ Yahoo! Groups Sponsor --------------------~--> Yahoo! Domains 
- Claim yours for only $14.70 http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/17folB/TM
--------------------------------------------------------------------~-> 

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



 



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/17folB/TM
--------------------------------------------------------------------~-> 

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