ASP to PHP MS SQL Connection Error

zybemixegixik

New Member
So I am currently going through the process of migrating alot of projects from old asp (VBScript) to PHP5. This project has to connect to a remote MS SQL DB. The old ASP connection string was:\[code\]<% Set MyConn = Server.CreateObject("ADODB.Connection")MyConn.Open "driver={SQL Server};server=**.***.***.***;UID=username;PASSWORD=password;DATABASE=DBname"session.lcid=2057%>\[/code\]My new PHP connection string is:\[code\]<?$myServer = "**.***.***.***";$myUser = "username";$myPass = "password";$myDB = "DBname";$dbhandle = mssql_connect($myServer, $myUser, $myPass)or die("Couldn't connect to SQL Server on $myServer"); ?> \[/code\]However although it tries it fails every time and displays this error:Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: ... in (filepath) on line 8Couldn't connect to SQL Server on ...I sort of think it might be to do with not defining a driver, but after searching for a while I can't seem to find a definitive answer as to which or what drive, if one is needed to use. Anyone see where im going wrong? I have checked and double checked the login information and it is correct.
 
Back
Top