'Microsoft.ACE.OLEDB.12.0'提供程序未注册-但已注册 [英] 'Microsoft.ACE.OLEDB.12.0' provider is not registered -but it is
问题描述
又甜又甜:
- 该应用程序可在x86机器上运行,但不能在x64上运行(在2008 Server和Windows 8上试用)
- 已经安装了Microsoft Access数据库引擎2010(还安装了Microsoft Office 2007 Access数据库引擎)
- 未安装MS Office
- 确认存在C:\ Program Files(x86)\ Common Files \ microsoft shared \ OFFICE12 \ ACEOLEDB.DLL
代码:
string conn = "Provider=SQLOLEDB;Data Source=localhost;Initial Catalog=Northwind;Integrated Security=SSPI;";
OleDbConnection _connOle = new OleDbConnection(conn);
有什么想法我应该怎么做才能使该应用程序在x64机器上运行?谢谢!
Any ideas what I should do to get this app to work on the x64 machines? Thanks!
推荐答案
我可以想到两种情况来解释您的问题:
I can think of two scenarios that could explain your issue:
-
您的C#项目设置为同时针对64位和32位平台,并且64位计算机仅安装了32位版本的Access Database Engine.引用失败,因为该程序以64位运行,但是缺少计算机
Your C# project is set to target both 64-bit and 32-bit platforms and the 64-bit machine has only the 32-bit version of the Access Database Engine installed. The reference fails because the program is running as 64-bit but the machine is missing
C:\ Program Files \ Common Files \ Microsoft共享\ OFFICE14 \ ACEOLEDB.DLL
C:\Program Files\Common Files\Microsoft Shared\OFFICE14\ACEOLEDB.DLL
您的C#项目设置为仅针对32位平台(x86),并且64位计算机仅安装了64位版本的Access数据库引擎.引用失败,因为该程序以32位运行,但是计算机丢失了
Your C# project is set to target 32-bit platforms only (x86) and the 64-bit machine has only the 64-bit version of the Access Database Engine installed. The reference fails because the program is running as 32-bit but the machine is missing
C:\ Program Files(x86)\ Common Files \ microsoft shared \ OFFICE14 \ ACEOLEDB.DLL
C:\Program Files (x86)\Common Files\microsoft shared\OFFICE14\ACEOLEDB.DLL
请注意,用于64位版本的Access Database Engine的安装程序仅会 安装64位版本,而不是同时安装两者.
Note that the installer for the 64-bit version of the Access Database Engine installs just the 64-bit version, not both.
这篇关于'Microsoft.ACE.OLEDB.12.0'提供程序未注册-但已注册的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!