Great article. I wrap everything, almost everything, in functions and i have 
consistently found myself locked in.  I wish I would have read this some time 
ago.

Take this advise seriously, especially if your application architecture uses 
this type of structure often.



---------- Original Message ----------------------------------
From: "Dan Vega" <[EMAIL PROTECTED]>
Reply-To: cf-talk@houseoffusion.com
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
The most significant release in over 10 years. Upgrade & see new features.
http://www.adobe.com/products/coldfusion

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

Reply via email to