[thelist] asp LOGIC QUESTION

Brian Delaney brian.delaney at mccmh.net
Fri Apr 21 10:35:06 CDT 2006

I have a sql record set that contains 12 uids. For each UID I want to go 
the servie table and return the services that are under this catagory's ID

Once I get the list of services I want to dynamically build the html for 

The problem is this: I can loop through the catagory recoredset and find 
the services per uid I just am stuck on how to create a dynaic unique
variable name to hold teh html for each service list.

The ASP code:

While Not rsCatagoryList.EOF
        Set rsServiceList = Server.CreateObject("ADODB.Recordset")
        strSQL1 = "Select * from Services where catagoryid = " & "'" &  
mid(rsCatagoryList("ID"),2,36) & "'" & " order by name "
       rsServiceList.Open strSQL1, ResourceCatalogDBConn
       While Not rsServiceList.EOF
          ServiceListHTML = "<option value=''><-- Choose One --></option>"
          ServiceListHTML = ServiceListHTML1 & "<option value='" & 
rsCatagoryList("ID") & "'>" & rsCatagoryList("Name") & "</option>"

The HTML Code:

      <td height="25" align="right" width="191">Activities / 
               <SELECT NAME="txtCatagory" ID="txtCatagory">
                            <% =CatagoryHTML %>

any help will be appreciated, thanks

This message, including any attachments, is intended solely for the use of the named recipient(s) and may contain confidential and/or privileged information.  Any unauthorized review, use, disclosure or distribution of this communication(s) is expressly prohibited.  If you are not the intended recipient, please contact the sender by reply e-mail and destroy any and all copies of the original message.

More information about the thelist mailing list