Question:  I'm working on someone else's webpage where there are 150 cfm
files and in almost all of the files there is at least one query to a single
datasource along with a username and password.  I would like to be able to
make it so that I have to change only three variables- one for the
datasource name, one for the uname, and one for the p/w- to make changes to
the datasource, username, or password that is referenced by ALL 150 files.
This way I don't have to go through all 150 files to change the datasource
name form datasource1 to datasource3 or something.  

I was going to add this: 
<CFSET vardatasource = "mydatasource">
<CFSET varusername = "myusername">
<CFSET varpassword = "mypassword">

And change all the references (yes I do realize I have to go through all 150
files to do this) from:
<CFQUERY DATASOURCE = "mydatasource" USERNAME = "myusername" etc... > 

to this:
<CFQUERY DATASOURCE = #vardatasource# USERNAME = #varusername# etc... >

But can I add this to just one page (the application.cfm page?) so that
these variables can be changed in only one page to affect all of the pages?
So if I change mydatasource to hisdatasource I only have to goto this one
page rather than all 150 and changing the variables at the top of the page
(unlike last time where I changed the name in all of the references).

Is there any other way than passing by using url parameters?
Rolando
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to