Learning ColdFusion 9: Application-Specific Data Sources

<cfcomponent
	output="false"
	hint="I define application settings and event handlers.">
 
	<!--- Define application settings. --->
	<cfset this.name = hash( getCurrentTemplatePath() ) />
 
	<!---
		Define the data source to be used by all CFQuery tags
		within this application. With this in place, you will not
		need to define a Datasource attribute in and of your
		CFQuery tags.
	--->
	<cfset this.datasource = "ben" />
 
	<!--- Define page settings. --->
	<cfsetting showdebugoutput="false" />
 
</cfcomponent>

For Cut-and-Paste