Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strange DB connection problems

Status
Not open for further replies.

LarrySteele

Programmer
May 18, 2004
318
0
0
US
I'm setting up another CF site - this is not my first rodeo. However, I'm getting errors that I can't make sense out of, hoping someone can point me in the right direction.

I my development environment, I have a connection defined in CF Admin. CF Admin successfully connects, so as expected, when I try to access the database from my CF application using this connection, the application picks up the data and goes.

Production. I have a connection defined in CF Admin. CF Admin successfully connects. This time, when I try to access the database from my CF application using this connection, I receive the error message "Variable DB_SOURCE is undefined". Obviously DB_SOURCE is what I'm using to point to the data source definition defined in CF Admin.

So here's how I see it. No problem connecting from CF Admin to the database, but can't connect from my CF application to the database via CF Admin.

I hate asking easy questions...

I actually have two servers. CF files are identical on both (via copy/paste). CF Admin appears to be the same (caveat: I'm human, it's possible I overlooked that one thing...). One server serves up the website just fine, the other, not so much. If they're both the same, they ought to act the same.

I've tried talking with the great Google Machine, but haven't found the right words to coax the answer. Basically stumped on where to go to find out what gives.

Any suggestions on settings to check or ideas to kick around would be greatly appreciated. I've been switching between scratching my head and pulling out my hair. I figure I have a very short time left before I'll not longer be a candidate for Hair Club.

Meanwhile, I'll bang my head on one of the other cubicle walls for a spell. [banghead]

 
Try creating a test cfm page that just does a generic query against the database, using the datasource name you set up in the admin, not the variable #DB_SOURCE#. Does it connect? Then it's a problem in your code, with the variable DB_SOURCE not being set correctly on the production server.

-Andy
 
Andy, thanks for the suggestion.

Here's the real kick. Yesterday afternoon - it just started working.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top