我如何在Windows 7上使用Access 2010连接到系统ODBC连接

我如何在Windows 7上使用Access 2010连接到系统ODBC连接

问题描述:

我正在尝试将Access DB(2010 32位)连接到Windows 7 PC(64位)上的系统ODBC连接

I'm trying to connect an Access DB (2010 32-bit) to a System ODBC connection on a Windows 7 PC (64-bit)

但是,当我尝试链接到它的机器数据源时,找不到我创建的ODBC数据源.

However, when I try to link to the Machine Data source for it, I can't find the ODBC data source I created.

我知道32位应用程序和64位驱动程序之间存在问题. 并且有两个版本的ODBC数据源管理器

I know there's an issue between 32 bit apps and the 64 driver. And that there are two version of the ODBC Datasource Administrator

  • C:\ Windows \ SysWOW64 \ odbcad32.exe
  • C:\ Windows \ System32 \ odbcad32.exe

我都尝试过,但似乎都无法创建对我可见的ODBC源.我该如何工作?

I've tried both, and neither one seems to be able to create an ODBC source that is visible to me. How can I get this working?

注意:用户数据源似乎可以正常工作,但系统数据源却不能正常工作.

Note: User data sources seem to work fine, but system data sources to not.

我正在使用的数据源是另一台计算机上的MS SQL Server 2008数据库.

Data source I'm working with is a MS SQL Server 2008 DB on a separate machine.

您是否尝试过通过Access制作一个?选择外部数据源odbc时,将有机会从Access内部创建DSN.您可以在那时创建系统DSN. (Access将为您启动正确版本的ODBC管理器.)

Have you tried making one from Access? When you choose external data sources, odbc, you are given a chance to create the DSN from inside of Access. And you can at that point in time create a system DSN. (Access will launch the correct version of the ODBC manager for you).

由于Access是32位的,因此这些系统DSN的位置在此处:

Because Access is a 32 bit, then the location of these system DSN's are thus here:

HKEY_LOCAL_MACHINE \ SOFTWARE \ Wow6432Node \ ODBC \ ODBC.INI \ SYSTEM DSN的名称

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI\name of SYSTEM DSN

因此您必须启动32位版本.

So you MUST launch the 32 bit version.

(但是,让Access为您启动它确实要容易得多).

(but, it REALLY it is a lot easier to let Access launch this for you).

因此,如果启动32位版本的ODBC管理器,则此版本:

So, if you launch the 32 bit version of the ODBC manager, this one:

C:\ Windows \ SysWOW64 \ odbcad32.exe

C:\Windows\SysWOW64\odbcad32.exe

那你应该没事(所以不要使用控制面板中的那个).

Then you should be fine (so do NOT use the one from the control panel).

因此,如果使用32位版本(来自sysWOW的版本)创建系统DSN,则在启动相同的odbc管理器时应在Access中看到它.您会看到以下内容:

So, if you create the system DSN using the 32 bit version (the one from sysWOW), then you should see it in Access when you launch the same odbc manager. You see this:

在上面,我创建了两个系统DSN,一个是通过Access启动管理器,另一个是通过cmd提示符启动syswow版本-两种方式,您都应该看到此列表.

In the above, I created two system DSN's, one from letting Access launch the manager, and the other from laucnhes the syswow version from the cmd prompt - either way, you should see this list.