SQLSTATE [IM002] SQLDriverConnect: Zero

Source: Internet
Author: User
Tags driver manager
SQLSTATE [IM002] SQLDriverConnect: 0conn. php & lt ;? Phptry & nbsp; {& nbsp; $ conn & nbsp ;=& nbsp; new & nbsp; PDO ("odb SQLSTATE [IM002] SQLDriverConnect: 0
Conn. php
 try {
    $conn = new PDO("odbc:Driver={Microsoft Access Driver (*.mdb)};Dbq=".realpath("../data/data.mdb"));
} catch (PDOException $e) {
    echo 'Connection failed: ' . $e->getMessage();
}
?>


Error prompt after running
Connection failed: SQLSTATE [IM002] SQLDriverConnect: 0 [Microsoft] [ODBC driver manager] no data source name found and default driver not specified

Baidu, Google, has been searching for a long time and does not know where the configuration is wrong. php_pdo_odbc.dll is enabled, phpinfo () also shows support for pdo/odbc, and the mdb file path is correct.

The system is win7sp1 x64.
PHP is 5.5.7 VC11 x64 Thread Safe
Apache is httpd-2.4.7-win64-VC11
Office is Office2010 x64

It is normal to connect to the mysql database with PDO, but an error occurs when connecting to the mdb. do you want to install or set any drivers: More

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.