both dbs are same and have same config, i is UAt a...
# cfml-general
s
both dbs are same and have same config, i is UAt and anoher is dev
g
You can define the datasource in the Application.cfc with that switch. Just go to your admin, where your Datasources are defined and then check at the bottom on how to add that to the Application.cfc. And in that way you can make a switch to it,
d
It depends on how globally you want this dsn change to apply. If you want it to affect everyone, an application var is probably right. But if you want it only to apply to developers who have switched this feature on for some temporary testing, while other users continue using the production db, then a session var makes more sense. In any case, think through how things will and should behave if this changes during a user's session, or even during a request.
p
@gert has the correct answer.