Re: PHP, PDO dsn-less connection to MS-SQL 2008

Cesare Leonardi <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
On 11/12/2011 08:14, Andreas wrote:
> Hi,
> can someone help me with PHP, PDO dsn-less connection to MS-SQL 2008,
> please?

This is the connection string i'm currently using to connect to MSSQL 
2000 with FreeTDS 0.91 and without any external conf file:

$dbDriver = "FreeTDS; TDS_Version=7.1; port=1433";
$dbh = new PDO("odbc:Driver=$dbDriver; Server=$serverFQDN; 
Database=$dbName; Uid=$usr; Pwd=$pwd;");

IIRC, after the upgrade to 0.91, i were not able to connect until i've 
explicity specified the port= parameter.

Cesare.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.