Hi,

Has anyone used CF_QueryToStruct, and if so can you loop through the
structure it returns. I have tried but I get an error telling me that:

"Error Diagnostic Information
Loop error 
Invalid collection "ChildDetails" - must be a valid struct or COM object"
This is my code:
<cfquery name="GetChildDetails" datasource="#attributes.DSN#">
        SELECT  DownloadID,
                        ParentID,
                        Title,
                        DownloadFile,
                        Section,
                        Slot
        FROM    #attributes.TableName#
        WHERE   ParentID = #attributes.ParentID#
        AND     Active = true
        ORDER BY DownloadID, Section, Title
</cfquery>


<CF_QueryToStruct queryname="GetChildDetails" r_struct="ChildDetails"
Keycolumn="downloadID">


<!--- Now display results of query --->
<cfloop collection="ChildDetails" item="cDetails">
        #cDetails.title#
</cfloop>

Or is the problem with my loop?

Stephen Adams
Forvus
53 Clapham Common South Side,
London,
SW4 9BX
http://www.forvus.co.uk


-- 
These lists are syncronised with the CFDeveloper forum at 
http://forum.cfdeveloper.co.uk/
Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
 
CFDeveloper Sponsors and contributors:-
*Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided by 
activepdf.com*
      *Forums provided by fusetalk.com* :: *ProWorkFlow provided by proworkflow.com*
           *Tutorials provided by helmguru.com* :: *Lists hosted by gradwell.com*

To unsubscribe, e-mail: [EMAIL PROTECTED]

Reply via email to