Hi,
i have installed MS SQL Server Express 2005 on my local machine. Also the managment Studio. I can connect to the MS SQL Server Express 2005 with my c# programm and with the mangament studio.
I have in Windows/system32 the file ntwdblib.dll version 2000.80.2039.0. The TCP/IP and Ip Protocl are active. But i cant connect with php to the local MS SQL Server Express 2005.
My php code is:
mssql_connect('192.168.0.2,1433', 'martin', '');
I get the return code Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: 192.168.0.2,1433 in c:\Inetpub\wwwroot\Projekte\Skripte\mssql_connection.php on line 2
Does anyone know what i made wrong or i have forgotten?
mfg martin
Are you trying to use Windows authentication or SQL Server authentication ? I guess that the user account your are trying to gain access with is not allowed access or can′t be determined (due to the web environment)
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
|||Hello,
i use Windows authentication and SQL Server authentication. Im trying to get in with my local windows account. But if i use a false account or password i would get an other error from php (false username or so like this).
martin
|||If you are using make sure that the credential is passed along with the WebServer authentification. If you use WIndows authentication you won′t have to pass a Username nor password as the authentication made without the credentials of the actual user. If the credential (token) cannot be passed through the middletier to the database, then you can not connect. If the used system does not support this, you will have to use SQL Server authentication.
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
Yeah. Thank you. It works.
No comments:
Post a Comment