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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

DSN less PHP to Access connection error

  • 15-08-2007 9: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