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]

Reply via email to