MSSQL access via PDO and Windows ODBC

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Benjamin Fischer

    #1

    MSSQL access via PDO and Windows ODBC

    Hi,

    I'm running a "Windows Server 2003" with "MS SQL 2000" IIS and PHP5.1 as
    test environment for my project. I would like to access my MSSQL-Server
    via Windows ODBC and PDO. I created a System DSN an i enabled the PDO
    extension in my php.ini. But the following code snippet keeps failing:

    <?php
    try
    {
    $DB = new PDO("odbc:Local Server");
    }
    catch (PDOException $e)
    {
    echo $e->getMessage() . "<br>";
    exit;
    }
    ?>

    Here is the error message:

    "could not find driver"

    Any suggestions?

    Greets

    Raskil
Working...