1

i want to work with pypyodbc and whenever I use

win_create_mdb

I get the error

Exception: Access Driver is not found.

I have installed Access Database Engine 32-bit, since my MS products are 32-bit.

Any thoughts?

Gord Thompson
  • 116,920
  • 32
  • 215
  • 418
nvrslnc
  • 349
  • 1
  • 5
  • 17
  • 2
    Are you running a 32-bit version of Python as well? If not, then your 64-bit version of Python will not be able to see the 32-bit driver. – Gord Thompson Aug 02 '16 at 12:13
  • No, python runs as 64-bit. When I tried to install Access Database Engine 64-bit it threw an error because all my office products are 32-bit. Is there a manual way to install the drivers? – nvrslnc Aug 02 '16 at 14:09
  • I got it! use the command line and do $> AccessDatabaseEngine_X64.exe /passive – nvrslnc Aug 02 '16 at 14:18

2 Answers2

2

The reason why it shows no driver error is because we didn't install the right driver (should install x64 version, but system will pop up error when install x64 version), then we can follow @nvrslnc's suggestion to install using the command line and do $> AccessDatabaseEngine_X64.exe /passive.

After I install x64 engine, I'm able to read the mdb file now.

Stephen Kennedy
  • 20,585
  • 22
  • 95
  • 108
zheng wee
  • 121
  • 1
  • 1
  • 8
-1

You can just install this AccessDatabaseEngine_X64.exe then restart your IDE then for driver name on 64bit app is this:

DRIVER=Microsoft Access Driver (*.mdb, *.accdb)

As connection string use for example:

cnxn_str="DRIVER=Microsoft Access Driver (*.mdb, *.accdb);DBQ=C:/Users/user_name/.../dbname.mdb;PWD=pwd_if_exist;"

cnxn=pyodbc.connect(cnxn_str)
Stephen Kennedy
  • 20,585
  • 22
  • 95
  • 108
Maria
  • 1