I have been shown how to do this with Application.cfc instead of using the Application.cfm - that is fine, I like learning new stuff. Yet after I made the change I cannot figure out how to get the DSN working properly. Before I just used a set DSN
in the Application.cfm file.
<cfparam name="DSN" default="">
<cfset DSN = "krl" />
And called it out here:
<CFQUERY NAME="Inital" DATASOURCE="#DSN#">
SELECT Website_Name
FROM InitalizationData
</CFQUERY>
Now setting it like:
component {
this.name = "app";
this.Sessionmanagement = true;
this.datasource = "krl";
public void function onSessionStart() {
// initialize cart
session.cart = [];
}
}
How do I call it out in my queries?