note 20606 deleted from function.mssql-connect by didou

From: Date: Sun, 04 Feb 2007 05:53:40 +0000
Subject: note 20606 deleted from function.mssql-connect by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-122792@lists.php.net to get a copy of this message
Note Submitter: fbellavance at agricom dot ca ---- I managed to solve the probleme above. Here is how I did it. Hope this helps someone else. first, I created a new instance of MSSQL 2k using the installer. There are 2 things I did that are important. first, I didn't use the default port (by default, if you install a new instance, it actualy uses the same port as the default one, stupid I know, but that's how it seams to work). Then I also removed, in the name pipe name, the $instancename. this is important later. now, for some reason, mssql_pconnect wouldn't take the port number we specified to it. Even using the default instance/port it wouldn't connect (1433). So what I did was create an ODBC entry that had the name I wanted to use to connect to my db, and omited EVERYWHERE to mention the instance's name. Then, I connect using the server name and the port I specified for the new instance in client configuration, in the ODBC link. Then when I use pconnect, I use it like this mssql_pconnect("$odbc_link_name","$username","$password"); It seams like it uses the ODBC link like a DNS entry to find where to connect to the database server. Hope this helps :)

« previous php.notes (#122792) next »