Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

DSN less PHP to Access connection error

Options
  • 15-08-2007 10:30am
    #1
    Closed Accounts Posts: 230 ✭✭


    I've been trying to connect to a simple access database using php (access was not my idea) but keep falling over at Execute(). Is there any way to get the output of why this is falling over? I have adodb installed on my server and test.mdb is sitting on the c:\ drive.

    Any help is greatly appreciated!

    D :confused:

    <?php
    include("adodb.inc.php");
    $database_type = "access";
    $db = NewADOConnection("$database_type");
    $dsn = "Driver={Microsoft Access Driver (*.mdb)};Dbq=c:\\test.mdb;Uid=;Pwd=;";
    $db->Connect($dsn);
    $sql = "SELECT * FROM tbl1";
    $rs = &$db->Execute($sql); //Fall at this point
    if (!$rs) {
    print $db->ErrorMsg();
    }
    else
    echo "Ran code sucessfully";
    ?>


Comments

Advertisement