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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error Connecting to MSSQL via ODBC on another server

Status
Not open for further replies.

rycamor

Programmer
Jun 3, 1999
1,426
US
Here is the error I am getting:

Code:
Warning: SQL error: [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '\'., SQL state 28000 in SQLConnect in E:\pub\quicklist3.php on line 20

I normally run PHP on Unix, so I am not as familiar with NT ODBC issues.

I have PHP running on IIS/NT4, and have made a System DSN for MSSQL 7 on another NT machine. I also made a system DSN for Access running on the local server. PHP has no trouble connecting to the Access DSN, so I know it has ODBC enabled.

But when I try to connect to the remote SQL 7 DSN, I get the above error every time. I did everything as standardly as possible, when creating the DSN: I chose the Standard security method (specific username and password), and did not enable trusted connections. Every time I create the DSN, I run the verification test, and it returns success. I can connect to this DSN using Access with no problem. It is just PHP that has the problem.

My PHP connection string is:
Code:
$cnx = odbc_connect("dsn_name","username","password");

Any ideas?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top