The artcile still does not address what I think is the root of the question though.
Are application variables availble inside a component (cfc) initiated within that application root? ---------- Original Message ---------------------------------- From: "Dan Vega" <[EMAIL PROTECTED]> Reply-To: [email protected] Date: Wed, 21 Feb 2007 09:31:55 -0500 > >This is not an attempt to promote my work but I just posted an article about >this a couple of days ago that I think you would benefit from. > >http://www.danvega.org/blog/index.cfm/2007/2/19/Avoid-Global-Data > >Dan Vega >http://www.danvega.org/blog/ > >On 2/21/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> >wrote: >> >> If I define a datasource variable in the application.cfm file in my >> webroot >> shouldn't that variable be available to a cfc inside my >> webroot/components/ >> directory? >> >> in webroot /application.cfm >> <CFSET datasource = "database_01"> >> >> in webroot/components/some.cfc >> >> <!--- CFC forLa Dolce/Sting contest - ---> >> <cffunction name="Expedition" access="public" returntype="query" >> output="false"> >> <cfquery datasource="datasource" name="Expedition"> >> SELECT ID >> FROM tbl_Ecotourism >> </cfquery> >> <cfreturn Expedition> >> </cffunction> >> >> >> ERROR IM GETTING >> The following information is meant for the website developer for debugging >> purposes. >> >> Error Occurred While Processing Request >> Data source datasource could not be found. >> >> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs http://www.adobe.com/products/coldfusion/flex2/ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:270305 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

