>       <cfset variables.DSN = "myDataSourceName">

This might be a little off the "best CFC practice" topic, but why not create a 
second CFC to govern all contact with your database(s)?  This way you don't 
have to worry about each CFC that lives in your "world" understanding database 
lingo and knowing what the datasource names are -- there's only one spot where 
it needs to happen.

We've done this (the component is called database.cfc), and it's really helped 
to streamline our code.  All queries and other DB-specific interactions are 
done through this component.  Other CFCs don't need to know anything about it 
other than invoking the proper method and passing the right arguments.

Matt

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Silver Sponsor - CFDynamics
http://www.cfdynamics.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188892
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to