Accessing an Access db file (accdb) on Windows 64bit via PHP using ODBC

Posted 10/02/2014 under General.

Recently we’ve done a couple of small projects which have required using an existing access database. Generally this isn’t too

Network Cables

Recently we’ve done a couple of small projects which have required using an existing access database. Generally this isn’t too much of an issue using PHPs PDO and ODBC functionality. You have to ensure that odbc and pdo_odbc are enabled in the php.ini and then:

Cool, now you can query away using PDO as normal.

However, when we came to setting up the same code to run on a system running 64bit Windows 7 we came across an issue where the correct ODBC drivers weren’t installed and we were getting the error:

If you find yourself in this situation, it turns out the solution was to install the file linked below:

http://www.microsoft.com/downloads/details.aspx?familyid=7554F536-8C28-4598-9B72-EF94E038C891&displaylang=e

I hope that’ll help someone else out there should you come across the issue.