How do you define a DSN in Application.cfm that can then be referenced throughout the queries in an application? Also, how do you reference to the DSN declared in Application.cfm in your queries?
****************************************
Reference these global variables in your queries as:
<CFQUERY
NAME="MyQuery"
DATASOURCE="#dsn#"
USERNAME="#userid#"
PASSWORD="#pwd#">
{(xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)}
</CFQUERY>
I don't know if this is the most elegant way to do it or not, but it works.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.