How to connect PHP with Microsoft Access database

后端 未结 6 637
感情败类
感情败类 2020-12-02 19:23

I am currently faced with a new challenge to develop a site using Microsoft Access as the primary database instead of mysql. I have not used MS Access before and I would lik

6条回答
  •  执笔经年
    2020-12-02 20:08

    Are you sure the odbc connector is well created ? if not check the step "Create an ODBC Connection" again

    EDIT: Connection without DSN from php.net

    // Microsoft Access

    $connection = odbc_connect("Driver={Microsoft Access Driver (*.mdb)};Dbq=$mdbFilename", $user, $password);
    

    in your case it might be if your filename is northwind and your file extension mdb:

    $connection = odbc_connect("Driver={Microsoft Access Driver (*.mdb)};Dbq=northwind", "", "");
    

提交回复
热议问题