note 72229 modified in ref.mssql by danbrown
| From: | danbrown@php.net | Date: | Mon, 18 May 2009 02:09:26 +0000 |
| Subject: | note 72229 modified in ref.mssql by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-155625@lists.php.net to get a copy of this message | ||
This took me a while to figure out, so I may as well pass it along to save somebody time.
If you are having trouble connecting with a DSNless connection using unixodbc with freetds,
don't forget to specify the TDS_Version in your connection string.
Example (8.0 is for SQL Server 2000 exclusively):
<?php
$dsn = "DRIVER=FreeTDS;TDS_Version=8.0; TRACE=No; SERVER=someserver; PORT=someport;
DATABASE=somedb; UID=somelogin; PWD=somepassword";
?>
--was--
This took me a while to figure out, so I may as well pass it along to save somebody time.
If you are having trouble connecting with a DSNless connection using unixodbc with freetds,
don't forget to specify the TDS_Version in your connection string.
Example (8.0 is for SQL Server 2000 exclusively):
$dsn = "DRIVER=FreeTDS;TDS_Version=8.0; TRACE=No; SERVER=someserver; PORT=someport;
DATABASE=somedb; UID=somelogin; PWD=somepassword";
http://php.net/manual/en/ref.mssql.php