contacts.cfc, we have defined a method which contains a query. This query has the datasource name attribute defined to correctly reference the database setup within the ColdFusion administration console.
As with all good development, we want to restrict hardcoding any values or references wherever we can and instead use variables to define them, (in this case the datasource name attribute).
A common practice in application development is to create your datasource name and store it in the
Application scope, ensuring its availability to every page template that is called, for example:
<cfset application.dsn = "projectTracker" />
You could use the
Application scope variable
application.dsn directly within your ...