I would set it up with in the init(). This would then allow you to have 2 datasources and still reuse your objects with out changing #application.dsn#.
/Dustin Tinney On 6/24/05, Stephen Adams <[EMAIL PROTECTED]> wrote: > Hi, > > I am trying to run a query and I'm trying to get the application.DSN I have > set in my application.cfm file, I can't use <cfquery name="query" > datasource="#application.dsn#"> should I be using variables.DSN or is better > practice to create a init() function (as a constructor) and pass the DSN > details as part of the init() function. Which should be accessible to the > queries in my CFC. I could also check if I have a connection to the database > in this init function and throw an error if no connection is found. > > What do you guys think? > ---------------------------------------------------------- > You are subscribed to cfcdev. To unsubscribe, send an email to > [email protected] with the words 'unsubscribe cfcdev' as the subject of the > email. > > CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting > (www.cfxhosting.com). > > CFCDev is supported by New Atlanta, makers of BlueDragon > http://www.newatlanta.com/products/bluedragon/index.cfm > > An archive of the CFCDev list is available at > www.mail-archive.com/[email protected] ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). CFCDev is supported by New Atlanta, makers of BlueDragon http://www.newatlanta.com/products/bluedragon/index.cfm An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
