Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2003
    Posts
    1

    Unhappy Unanswered: DB Connection Error

    Hi.

    I am trying to connect to a Microsoft Access DB using the following PHP connection string: -

    <?php
    $db = 'db/ljonny18.mdb';
    $conn = new COM('ADODB.Connection');
    $conn->Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=$db");

    $sql = "select * from guestbook";
    $rs = $conn->Execute($sql);
    ?>


    It works fine on my local machine, but when I put it online i get the folloeing error: -

    Fatal error: Cannot instantiate non-existent class: com in /home/ljonny18/public_html/ljonny18/guestbook.php on line 3


    NOTE - line 3 is: -
    "$conn = new COM('ADODB.Connection');"

    Could someone please help,

    Thanks,
    Jon.

  2. #2
    Join Date
    Oct 2003
    Posts
    13

    Thumbs up have a look

    might be this informaiton can help you

    http://www.php.net/manual/en/faq.dat...tabases.access
    Manish Khanna
    manish@i4u.com.au

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •