Oppposite Workings of OLEDB/ODBC between Python and MS Access VBA

会有一股神秘感。 提交于 2019-12-01 11:28:39

Short answer:

Yes, to minimize headaches you should be running a 64-bit version of Python if you have 64-bit Office installed and you want to manipulate Access databases from Python.

Longer answer:

The older "Jet" engine/drivers and the newer Access Database Engine (a.k.a. "ACE") engine/drivers are completely separate entities.

The older "Jet" drivers...

 ODBC: Driver={Microsoft Access Driver (*.mdb)}
OLEDB: Provider=Microsoft.Jet.OLEDB.4.0  

... are installed as an integral part of the Windows OS but they only available to 32-bit applications.

You have 64-bit Office installed, so you have the 64-bit version of the newer "ACE" drivers ...

 ODBC: Driver={Microsoft Access Driver (*.mdb, *.accdb)}
OLEDB: Provider=Microsoft.ACE.OLEDB.12.0  

... and they are only available to 64-bit applications.

Your current 32-bit Python environment can use the Jet drivers but not the ACE drivers

You have the 64-bit version of Access, therefore your VBA code is running in the 64-bit universe and it can use the ACE drivers but not the Jet drivers.

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