PHP, PDO dsn-less connection to MSSQL 2k8 in CentOS

Celso Fontes <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <CAFvmKrtmX19bB8BFuN=m6gCEXJ07gNRC-Qp2LwcX6w2Z_G+5sw@mail.gmail.com>
Hi everyone !
Can someone help me with PHP, PDO dsn-less connection to MS-SQL 2008
in Cent OS, please?

code:

      $dsn = "FreeTDS;Server=10.x.x.x;Database=mydb;Uid=user;Pwd=password";

      $pdo = new PDO("odbc:Driver=$dsn",
                    "dbuser",
                    "password"
                   );


error:

SQLSTATE[IM002] SQLDriverConnect: 0 [unixODBC][Driver Manager]Data
source name not found, and no default driver specified


thanks,
celso
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.