Well, now that i think about it, you would want to copy it to the variable scope anyway. Otherwise, each iteration of the loop you'd be executing the query again by calling the function every time.
that is: <cfloop query="application.queries.getQuery()"> <cfoutput>#application.querys.getQuery().name#</cfouput> </cfloop> If that worked, it would exec the function getQuery() in application.queries and iterate over the rows. Then each iteration we re-call the function to get the same query and we'd only return the "name" field for the first row. You need to copy the _results_ of the query to a variable so you can iterate over it. In other words, you can't iterate over a function call :) On Wed, 24 Nov 2004 13:30:02 -0500, Ryan Emerle <[EMAIL PROTECTED]> wrote: > Yeah, ran into that myself. > > As far as i could tell, it seems to be a limitation of the cfouptut > and cfloop tags. It looks like MACR needs to update those tags for > the new syntax made available by MX. Until then, i guess we'll have > to settle on copying it to the variable scope. > > > > > On Wed, 24 Nov 2004 13:20:40 -0400, Robert Everland III > <[EMAIL PROTECTED]> wrote: > > I have a CFC that I have put all of my stored procedures into. I then input > > the CFC into the application scope for use throughout my application. The > > issue I have is that I can reference the query in a cfdump like this > > <cfdump var="#application.queries.testquery()#"> and it will dump the > > query. I can do isquery(application.queries.testquery()) and it returns > > yes, but when I do <cfoutput query="application.queries.testquery()"> or > > <cfoutput query="#application.queries.testquery()#"> it throws an error. I > > can set the method to a local variable and then I'm able to reference the > > query, but it would be nice to use the method without having to move it to > > a local variable. Has anyone ran into this issue? > > > > Bob > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:185342 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

