Hi,

How do I reference a query from a cfc that has been created using 
createObject... I've created an example of what I mean below? I can cfdump it, 
but it breaks when I use it within the query attribute of an output tag.

The function:
<CFFUNCTION NAME="myfunc" returntype="query">

<cfquery name="getQ" datasource="#REQUEST.theDatabase#">
SELECT column
from   myTable
</cfquery>

<cfreturn getQ />

</CFFUNCTION>


Declared in Application.cfc
<cfset application.myCFC = createObject("component","/cfcfolder/myCFC")/>


Calling the CFC:
<cfoutput query="#application.myCFC.getQ()#">

I'm sure I must be missing the simple solution to this but can't see or find it.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:266564
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to