Copy link to clipboard
Copied
Hi,
I set my datasource in the Application cfc like this
<cffunction name="onRequestStart" access="public" returntype="void">
<cfif NOT IsDefined("application.datasource")>
<cfset application.datasource="mysite">
</cfif>
If I have to look at another site running on the same local development server if often cannot connect as the application is trying to connect to the other datasource. Is there a way to flush out the application variables in administrator?
Thanks,
H.
Copy link to clipboard
Copied
Rename
Application.Name="new name"
Copy link to clipboard
Copied
OnApplicationStart seems to me to be the best place for the code, not onRequestStart.
Copy link to clipboard
Copied
You have something configured very badly then. You can have as many
applications as you want on a server and each application has it's own
name and it's own application variables (meaning that the datasource
variable from one application will be independent from the datasource
variable of another application).
Where do you have your Application.cfc file ?
Also, I usually have set my application variables in
onApplicationStart and have a trigger to reset the application in
onRequestStart:
<cfif StructKeyExists(Url, "reinit")> <cfset onApplicationStart()> </cfif>
Mack
Copy link to clipboard
Copied
Oops. Sorry. Wrong thread.