Bruce Gust
asked on
Why doesn't my connection work?
I've got a SQL Server Studio installed with a quality connection to the database.
I've got an ODBC connection running happily that connects to the database named symbion_bgust.
The code on my page is:
<?php
$cxn=odbc_connect('symbion _bgust');
if(!$cxn)
{
echo "you're still not connected.";
}
Current landscape: My ODBC Connection was a bear getting to work. It wasn't until I used a Named Pipes configuration and made my database the default database. Only then was I able to get past all of the "tests" successfully.
When I go out to IIS Manager and click on "Database Manager" and double click on "Local SQL Server" I get an error that reads:
"An attempt to attach an auto-named database for file C:\Windows\system32\inetsr v\aspnetdb .mdf filed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share."
Don't know if that's a factor, but the convoluted mess that I've had to contend with coupled with my ignorance has made for a very frustrating several hours.
Why am I not able to use a seemingly healthy ODBC connection and connect to my SQL Server?
I've got an ODBC connection running happily that connects to the database named symbion_bgust.
The code on my page is:
<?php
$cxn=odbc_connect('symbion
if(!$cxn)
{
echo "you're still not connected.";
}
Current landscape: My ODBC Connection was a bear getting to work. It wasn't until I used a Named Pipes configuration and made my database the default database. Only then was I able to get past all of the "tests" successfully.
When I go out to IIS Manager and click on "Database Manager" and double click on "Local SQL Server" I get an error that reads:
"An attempt to attach an auto-named database for file C:\Windows\system32\inetsr
Don't know if that's a factor, but the convoluted mess that I've had to contend with coupled with my ignorance has made for a very frustrating several hours.
Why am I not able to use a seemingly healthy ODBC connection and connect to my SQL Server?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Perfect!
Thanks, Dave!
Thanks, Dave!
You're welcome.
Did you created a ODBC data source on that server with all the details? like server name/IP, database name, login, password? You need that to be created and tested to make sure you can connect to that server/database before using it in the code.