p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

  Return to Index  

asp_databases thread: data shaping

Message #1 by "Ian Richardson" <ian@i...> on Wed, 19 Dec 2001 17:36:25

I wonder if anyone has experienced this behaviour before.

I am using the code below to produce a 'bulleted' list thus:








-------Financial Services


On the web page a button is clicked and a pop-up window appears that runs 

the below code and produces the data shaped list.

This works fine, but on the same web page I have another button that does 

the same things as just outlined but uses 2 different tables from the same 

database. The first button selects Career Choices the second selects 


If I click Career Choices first that list appears no problem, but, if I 

then click Interests the pop-up window appears but the content seems to 

crash and I get a server error page after the script times out. This 

behaviour is the same which ever link I click first, the second link fails.

does anyone know if there are any limitations on using data Shaping in 

this way?

many thanks and happy christmas.



' my code

strSQL = "SHAPE { SELECT UID,CareerCategory FROM tblCareerCategories } " & 


    "APPEND ({ SELECT * FROM tblCareers } " & _

    "AS Courses RELATE UID to CareerID )"

Set rst = Server.CreateObject("ADODB.Recordset")

'open recordset

rst.Open strSQL, con

Do While Not rst.EOF   

    'set object to child recordset and iterate through

    Set rstChild = rst("Courses").Value

response.write "<tr>"

response.write "<td class=""head"">" & rst("CareerCategory") & "</td>"

response.write "</tr>"

Set rstChild = rst("Courses").Value

    If Not rstChild.EOF Then

        Do While Not rstChild.EOF

response.write "<tr>"

response.write "<td class=""input"">" & rstChild("CareerName") & "</td>"

response.write "<td class=""input"">" & rstChild("Sub") & "</td>"

response.write "<td class=""input""><input type=""Checkbox"" 

name=""userSelection"" value=" & rstChild("UID") & "></td>"

response.write "<tr>"




End If




  Return to Index