Woohoo, you are the man! That's exactly what I needed sir.
Have a great evening! Chris Peterson -----Original Message----- From: Ben Nadel [mailto:[EMAIL PROTECTED] Sent: Monday, April 02, 2007 5:04 PM To: CF-Talk Subject: RE: Anyone have quick help - how to refer to a dynamic named query? These queries are defined in the Variables scope of the page (or the THIS scope if you are in a CFC): #VARIABLES[ "getCompanyTractorStats#curDay#" ].myCol# ....................... Ben Nadel Certified Advanced ColdFusion MX7 Developer www.bennadel.com Need ColdFusion Help? www.bennadel.com/ask-ben/ -----Original Message----- From: Peterson, Chris [mailto:[EMAIL PROTECTED] Sent: Monday, April 02, 2007 5:01 PM To: CF-Talk Subject: Anyone have quick help - how to refer to a dynamic named query? I have code generating a dynamic named query, ie getCompanyTractorStats2 getCompanyTractorStats3 I have a CFC that generates a query result, and I assign dynamic names like this: <!---// Loop from the 1st of the month to current and create per-day variables //---> <cfloop from="1" to="#dateFormat(now(), "DD")#" index="curDay"> <cftry> <!---// Call function to get tractor statistics //---> <cfset "getCompanyTractorStats#curDay#" = cfc.getCompanyTractorStats(url.dsn, '#dateFormat(now(), "MM")#/' & curDay & '/#dateFormat(now(), "YYYY")#') /> <cfset "getOwneropTractorStats#curDay#" = cfc.getOwneropTractorStats(url.dsn, '#dateFormat(now(), "MM")#/' & curDay & '/#dateFormat(now(), "YYYY")#') /> <cfcatch type="any"> <!--- Ignore errors, that means the file is missing //---> </cfcatch> </cftry> </cfloop> I need to reference the values to specific queries below I am trying #getCompanyTractorStats[curDay].myCol# Trying all combinations of eval and DE, I am tearing my hair out, anyone help me here? Thanks a bunch! Chris Peterson ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create Web Applications With ColdFusion MX7 & Flex 2. Build powerful, scalable RIAs. Free Trial http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:274359 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

