I am trying to replicate programmically the grouping and ordering function of an Access report using ado and asp and the SHAPE command. I have gotten things set up to open the MSDataShape provider and feed it a SHAPE string like this:
objCommand.CommandText = “SHAPE ” & _
“{SELECT Categories, CRCGType, MemberType FROM tblOutlookContacts} ” & _
“APPEND ({SELECT Categories, FullName, Email1Address FROM tblOutlookContacts} ” & _
“RELATE Categories TO Categories)”
That seems to parse fine but on outputting the SHAPE command I get an error
Microsoft VBScript runtime error ‘800a01a8’
Object required: ‘[string: “Brooks, Duval, Jim_W”]’
when using the following asp to print the results out:
Do while Not objRS.EOF
Response.Write “Counties Covered: ” & objRS(“Categories”) & _
“CRCG Type: ” & objRS(“CRCGType”) & _
“Member Type: ” & objRS(“MemberType”) & _
SET rsCategories = objRS(“Categories”).Value
While Not rsCategories.EOF
Response.Write “Name: ” & objRS(“FullName”) & _
“Email Address: ” & objRS(“Email1Address”) & _
Wend
objRS.MoveNext
Response.Write “
”
LOOP
where the offending line is the SET section in the output code. I’m completely new to the SHAPES structure and have been looking at MSDN articles for help. I think there may be a problem trying to assign the parent correctly (which is Categories, a series of County names comma-separated). Any ideas on what might be happening here?
I’ve taken this discussion up in the web design and scripting forum but it was advised that i ask the Access mavens as this may have to do with the proper use of SHAPE.
TIA