Connecting to MS Access 2007 (.accdb) database using pyodbc

醉酒当歌 提交于 2019-11-29 02:05:38
Renaud Bompuis
  1. Try to use something like the following instead of using the same string as the one for OLeDb:
    "Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=C:\DB.accdb;"

  2. You may not be able to talk to the driver directly from your x64 Python application: Access 2007 and its ACE driver are 32 bits only.
    Instead, get the ACE x64 driver for Access 2010, but be careful that if you already have Access or the ACE driver 32bit installed, it won't work.
    I would stick to the 32bit versions of Python and of the ACE driver if you expect your app to be run on other systems: it is not recommended to mix x64 and x86 versions of Office tools and drivers, you'll probably end up with lots of issues if you do.

  3. If the issue is not with the 32/64bit mix, then maybe this question has the answer you seek.

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