问题
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?
回答1:
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.
回答2:
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)
来源:https://stackoverflow.com/questions/38716441/pypyodbc-access-driver-is-not-found