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.
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Macromedia ColdFusion MX7
Upgrade to MX7 & experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:270300
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