I wouldn't :)
I often include things like this in configuration files rather than inline
in the code to keep it more portable, but there is nothing that would keep
you from doing this inline in your Application.cfm.
I would actually take it a step further though. Just to keep from setting
and resetting on your application on every request I set my application
scoped variables in a block like this:
<cfif NOT StructKeyExists(application,"DawnsDsn")>
<cflock name="#application.applicationname#_DawnsDsn"
type="exclusive" timeout="30">
<cfif NOT structKeyExists(application,"DawnsDsn")>
<cfset application.DawnsDsn = "SuperCoolDsn" />
</cfif>
</cflock>
</cfif>
The second conditional check is to ensure thread safety, which is not a
really important issue when it comes to something like setting a DSN, but
imo is still good practice.
Hope that helps.
~Dave
On 5/10/07, Green, Ms. Dawn <[EMAIL PROTECTED]> wrote:
In an application.cfc page, why would you use request variables to set
your datasource, rootname of your site & adminEmail instead of Application
variables?
What are the pros and cons of doing it either way?
Thanks for any help in clarifying this for me.
Dawn Green
_______________________________________________
Reply to DFWCFUG:
[email protected]
Subscribe/Unsubscribe:
http://lists1.safesecureweb.com/mailman/listinfo/list
List Archives:
http://www.mail-archive.com/list%40list.dfwcfug.org/
http://www.mail-archive.com/list%40dfwcfug.org/
DFWCFUG Sponsors:
www.instantspot.com/
www.teksystems.com/
--
~Dave Shuck
[EMAIL PROTECTED]
http://daveshuck.instantspot.com
_______________________________________________
Reply to DFWCFUG:
[email protected]
Subscribe/Unsubscribe:
http://lists1.safesecureweb.com/mailman/listinfo/list
List Archives:
http://www.mail-archive.com/list%40list.dfwcfug.org/
http://www.mail-archive.com/list%40dfwcfug.org/
DFWCFUG Sponsors:
www.instantspot.com/
www.teksystems.com/