I have a stored proc that returns a query. Problem is I don't know what
columns are retutned.
I can use qryReport.getColumnList() to get me a list of columns that are
returned.
I can display these in a table with the following code
<cfset list.qryResults.columns = arrayToList(qryReport.getColumnList())>
<cfset variables.Querycolumns = arraynew(1)>
<cfset variables.Querycolumns = listtoarray(list.qryResults.columns )>
<cfdump var="#variables.Querycolumns#">
<!--- table to display results --->
<table>
<!--- header --->
<tr class="tableStyle1">
<cfloop from="1" to="#arraylen(variables.Querycolumns)#"
index="counter">
<th class="tableStyle1">
<cfoutput>#variables.Querycolumns[counter]#</cfoutput>
</th>
</cfloop>
</tr>
My problem is that I can not seem to use this array to dump the query results.
This code is below
<cfoutput query="qryReport">
<tr class="tableStyle1">
<cfloop from="1"
to="#arraylen(variables.Querycolumns)#" index="counter">
<td colspan="tableStyle1">
#qryReport['variables.Querycolmns[#counter#]']#
</td>
</cfloop>
</tr>
</cfoutput>
This query returns an error [EMAIL PROTECTED] ] is not indexable by
variables.Querycolmns[1]
Any Ideas??
Thanks
Brian Knott
MIS Specialist | Pricing and MIS CFO Banking | CFO Retail Banking
ext 61984 ph 07 3836 1984 fax 07 3835 5455
________________________________
This e-mail is sent by Suncorp-Metway Limited ABN 66 010 831 722 or one of its
related entities "Suncorp".
Suncorp may be contacted at Level 18, 36 Wickham Terrace, Brisbane or on 13 11
55 or at suncorp.com.au.
The content of this e-mail is the view of the sender or stated author and does
not necessarily reflect the view of Suncorp. The content, including
attachments, is a confidential communication between Suncorp and the intended
recipient. If you are not the intended recipient, any use, interference with,
disclosure or copying of this e-mail, including attachments, is unauthorised
and expressly prohibited. If you have received this e-mail in error please
contact the sender immediately and delete the e-mail and any attachments from
your system.
If this e-mail constitutes a commercial message of a type that you no longer
wish to receive please reply to this e-mail by typing Unsubscribe in the
subject line.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"cfaussie" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---