nvrslnc
nvrslnc

Reputation: 349

pypyodbc - Access Driver is not found

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?

Upvotes: 1

Views: 3798

Answers (2)

Maria
Maria

Reputation: 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)

Upvotes: -1

zheng wee
zheng wee

Reputation: 131

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.

Upvotes: 2

Related Questions