Skip to main content
March 13, 2008
Question

newbie help

  • March 13, 2008
  • 2 replies
  • 465 views
Hi,
my site was recently moved by the webhost and now the site cannot connect to the db, they have changed the pass for the db.

Where in my site will I find the password used to connect to the db? all seems to refer to "request.dsn" but I can find no place where the pass. to connect was set. I do find the username..but not the pass..

any thoughts??
This topic has been closed for replies.

2 replies

Participating Frequently
March 13, 2008
If it isn't set for the DSN in ColdFusion administrator, then you would need to add a password attribute to every cfquery or cfstoredproc tag. Sounds like "they" did not set it for the DSN, since whe nthey moved your site, the password may not have been known. You need to find out from your webhost how they manage the DSN settings for their clients, otherwise you will have to set it as described above.

Phil
Inspiring
March 13, 2008
sandypear wrote:
>
> any thoughts??
>


What version of CF? Since version 6, some seven or eight years ago.
You do NOT put user name or password into your code. It is defined in
the DSN configuration done through the Administrator application which
with most shared hosting systems you will have NO access to. You host
would do this. Sounds like they changed the password in the database
but not the ColdFusion Administrator configuration.

If you are on dedicated or VPS system and have access to your own
Administrator, then of course that is where you would do it.

If you are using version 5 or earlier where one could put this into the
code, then where ever your request variables are being set. Probably in
some Application.cfm file.
Participating Frequently
March 13, 2008
quote:

Since version 6, some seven or eight years ago. You do NOT put username or password into your code.
You have been able to do it either way since at least version 4.5, which was the version I started on. One advantage (besides security) of putting username and password in the DSN is when using CFTRANSACTION, since you have problems with that tag unless username and password are described in the DSN (at least through CFMX 7.x).

Phil