Where applicable (on createObject/cfobject instead of cfinvoke), I make an init() method that sets a local variable for a dsn. Init methods look like:
function init(dsn) { variables.dsn=arguments.dsn; return this; } then to instantiate the cfc, it's like this: myCFC = createObject("component","myCFCFile").init(request.dsn); After that, all queries use datasource="#variables.dsn#" for the life of the object (variables, appplication, session, etc.) -nathan strutz dave wrote: > on his galleon forums he uses a .ini file > > > ---------- Original Message ---------------------------------- > From: Mike Kear <[EMAIL PROTECTED]> > Reply-To: [EMAIL PROTECTED] > Date: Mon, 1 Nov 2004 11:04:08 +1100 > > >>Raymond says: >> >>[quote] >>The method I use is to instantiate (in the application.cfm) a >>"DP_PersistenceInfo" CFC - this CFC contains all of the properties related >>to a specific datasource. This CFC is added to a special "DP_Application" >>CFC which is, itself, stored in the Application scope. >>[/quote] >> >>Isn't this conceptually the same thing as using a shared scope? How >>is putting the persistence variables such as datasource name in a >>persistence.cfc different from putting those same variables in >>application variables? Doesnt that create the same dependencies? >> >>Cheers >>Mike Kear >>Windsor, NSW, Australia >>AFP Webworks >>http://afpwebworks.com >>.com,.net,.org domains from AUD$20/Year >> >> >> >>On Sun, 31 Oct 2004 18:50:11 -0500, dave <[EMAIL PROTECTED]> wrote: >> >>>yeah thats why i asked it >>>raymond has a pretty clever way but i dont really get it >>> >>> >>> >> >> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF community. http://www.houseoffusion.com/banners/view.cfm?bannerid=38 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183035 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=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54