Connecting to an access Database in PHP

Discussion in 'HTML / PHP / JavaScript / CSS' started by qaak, Sep 3, 2006.

  1. I tried this:

    <code>

    <?PHP
    odbc_connect("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" . str_replace("/", "\\", $_SERVER["DOCUMENT_ROOT"]) . "\_database\mydatabase.mdb", "", "");
    ?>


    </code>

    I got this error:
    -----------------------------------------------


    PHP Warning: odbc_connect(): SQL error: [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0x3f40 Thread 0x2700 DBC 0x973dac Jet'., SQL state S1000 in SQLConnect in E:\web\localgirlso\htdocs\test\database.php on line 2

    -----------------------------------------------
     
  2. I found the answer after many unsuccessful attempts but not too many [​IMG]

     

Share This Page