pypyodbc - Access Driver is not found

旧城冷巷雨未停 提交于 2020-12-29 08:42:24

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!