If you're using ColdFusion 9.01 or higher you can set these values within Application.cfc. In summary:
Application.cfc lets you specify data source authentication details for the data source. The data source settings can now be a string or a struct. When string, it is considered to be the data source name and authentication information is taken from the data source defined in the ColdFusion Administrator.
You can specify the authentication information using a struct value for data source. The following are the key names:
name
: data source nameusername
: Username for the data sourcepassword
: Password for the data sourceExample:
<cfset this.datasource={name='cfartgallery' , username="user" , password="passwd"}>
or
<cfset this.datasource="cfartgallery">