note 20606 added to function.mssql-connect

From: Date: Tue, 09 Apr 2002 19:41:20 +0000
Subject: note 20606 added to function.mssql-connect
Groups: php.notes 
Request: Send a blank email to php-notes+get-29029@lists.php.net to get a copy of this message
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 :) -- http://www.php.net/manual/en/function.mssql-connect.php http://master.php.net/manage/user-notes.php?action=edit+20606 http://master.php.net/manage/user-notes.php?action=delete+20606 http://master.php.net/manage/user-notes.php?action=reject+20606

« previous php.notes (#29029) next »