Colman, Richard wrote:
> I know the datasource is there, in the root directory. So why can't the
> CFC find it ...??

Most likely because the cfc is not in the root or a sub-directory under 
the root.  If so then it is not being associated with any 
application.cfc|cfm file that may be in that root with their application 
name properties.  Since the CFC does not have this application name 
property it does not belong to the application, or any application for 
that matter.

Short term fix:  Move the CFC so it is under the application directory 
OR add a matching <cfapplication name="..."...> tag to the CFC so that 
it belongs to the desired application construct.

Long term fix:  Don't have CFC's rely on external variable scopes.  This 
is just one of many reasons why it is considered a best pratice to 
always pass all data to a component that it will need to use.  Rather 
then having the CFC be aware of the application scope.  Just pass the 
application variable to the CFC from the calling code and set it as an 
internal property of the CFC.  Then it will work no matter where the CFC 
lives or how it is used, and it can easily be used by many different 
applications which would not be possible with the short term fix.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

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