“找不到数据源名称,并且未指定默认驱动程序"与Access ODBC [英] "Data source name not found and no default driver specified" with Access ODBC

查看:142
本文介绍了“找不到数据源名称,并且未指定默认驱动程序"与Access ODBC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的软件:

  • Python 3.4 -64位
  • PyODBC 64位
  • 已安装MS Office程序包(32位)

问题:

现在,我尝试使用PYODBC访问安装在计算机中的MS Access 2010.无论我尝试什么,它都行不通.我的错误总是这样:

Now, I try to access MS Access 2010 installed in my computer using PYODBC. It does not work regardless of what I try. My error is always this:

pyodbc.Error: ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0) (SQLDriverConnect)')

我已经看过了:

pyodbc和ms访问2010连接错误

无法使用pyodbc连接到Access DB

建议我确定它是32-64位问题.是否可以进行一些修改才能使其工作而无需安装32位python和32位pyodbc?我检查了此网站.在64位上使用ODBC(32位和64位)位Windows ,其中说明了有关访问控制面板以修改ODBC连接和/或驱动程序的信息.但是,我对Windows数据库连接内部知识并不了解,无法开始一些更改.

It is suggested that it is 32-64 bit problem which I am sure it is. Is there some modification that can be done to make it work without installing 32 bit python and 32 bit pyodbc? I checked this website.Using ODBC (32-bit and 64-bit) on 64-bit Windows which explains about accessing the control panel to modify ODBC connnection and/or drivers. However, I don't know much about windows database connection internals to commence some changes.

有什么我可以做的事吗?

Is there something that I can do to make it work?

推荐答案

是否可以进行一些修改以使其在不安装32位python和32位pyodbc的情况下起作用?

Is there some modification that can be done to make it work without installing 32 bit python and 32 bit pyodbc?

并非如此.如果您安装了32位Office,则您具有32位版本的Access数据库引擎(也称为"ACE"),并且只有32位应用程序可以使用它.

Not really. If you have 32-bit Office installed then you have the 32-bit version of the Access Database Engine (a.k.a. "ACE"), and only 32-bit applications can use it.

如果访问数据库引擎的64位版本的安装程序检测到32位Office组件,则该安装程序将中止.有一种方法可以强制安装程序继续运行,但是不建议这样做,因为它显然会破坏Office.

The installer for the 64-bit version of the Access Database Engine will abort if it detects 32-bit Office components. There is a way to force the installer to continue, but that is not recommended because it can apparently break Office.

底线::应用程序的位数"必须与已安装的Access数据库引擎的位数"匹配.因此,实际上,您的选择是

Bottom Line: The "bitness" of your application must match the "bitness" of the installed Access Database Engine. So, practically speaking, your options are

  1. 使用32位Python和pyodbc,或
  2. 将您的32位Office替换为64位版本.

这篇关于“找不到数据源名称,并且未指定默认驱动程序"与Access ODBC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆