简体   繁体   English

“Microsoft.ACE.OLEDB.12.0”提供程序未注册 - 但它是

[英]'Microsoft.ACE.OLEDB.12.0' provider is not registered -but it is

Short and sweet: 短而甜蜜:

  • app works on x86 machine but not on x64 (tried on a 2008 Server and a Windows 8) 应用程序适用于x86机器但不适用于x64(在2008 Server和Windows 8上试用)
  • Microsoft Access Database Engine 2010 already installed (also have Microsoft Office 2007 Access Database Engine installed) 已安装Microsoft Access数据库引擎2010(还安装了Microsoft Office 2007 Access数据库引擎)
  • MS Office not installed MS Office未安装
  • confirmed the existence of C:\\Program Files (x86)\\Common Files\\microsoft shared\\OFFICE12\\ACEOLEDB.DLL 确认存在C:\\ Program Files(x86)\\ Common Files \\ microsoft shared \\ OFFICE12 \\ ACEOLEDB.DLL

Code: 码:

string conn = "Provider=SQLOLEDB;Data Source=localhost;Initial Catalog=Northwind;Integrated Security=SSPI;";
OleDbConnection _connOle = new OleDbConnection(conn);

Any ideas what I should do to get this app to work on the x64 machines? 有什么想法让我的应用程序在x64机器上运行? Thanks! 谢谢!

I can think of two scenarios that could explain your issue: 我可以想到两个可以解释您的问题的方案:

  1. 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. 您的C#项目设置为针对64位和32位平台,而64位计算机仅安装了32位版本的Access数据库引擎。 The reference fails because the program is running as 64-bit but the machine is missing 引用失败,因为程序以64位运行但机器丢失

    C:\\Program Files\\Common Files\\Microsoft Shared\\OFFICE14\\ACEOLEDB.DLL C:\\ Program Files \\ Common Files \\ Microsoft Shared \\ OFFICE14 \\ ACEOLEDB.DLL

  2. 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. 您的C#项目设置为仅针对32位平台(x86),而64位计算机仅安装了64位版本的Access数据库引擎。 The reference fails because the program is running as 32-bit but the machine is missing 引用失败,因为程序以32位运行但机器丢失

    C:\\Program Files (x86)\\Common Files\\microsoft shared\\OFFICE14\\ACEOLEDB.DLL C:\\ Program Files(x86)\\ Common Files \\ microsoft shared \\ OFFICE14 \\ ACEOLEDB.DLL

Note that the installer for the 64-bit version of the Access Database Engine installs just the 64-bit version, not both. 请注意,64位版本的Access数据库引擎的安装程序安装64位版本,而不是两者。

Although the question has already been answered, here's what fixed things for me after spending many hours on the problem. 虽然这个问题已经得到了回答,但是在这个问题花了很多时间之后,这就解决了我的问题。

I used Process Monitor to find out what registry key was being looked up. 我使用Process Monitor来查找正在查找的注册表项。 It was HKEY_CLASSES_ROOT\\Microsoft.ACE.OLEBD.12.0 . 它是HKEY_CLASSES_ROOT\\Microsoft.ACE.OLEBD.12.0

In my case this key was missing despite "Microsoft Access database engine 2010" being listed in Programs and Features. 在我的情况下,尽管“程序和功能”中列出了“Microsoft Access数据库引擎2010”,但此密钥仍然丢失。

In addition the file ACEOLEDB.DLL already existed in C:\\Program Files\\Common Files\\Microsoft Shared\\OFFICE14\\ . 此外,文件ACEOLEDB.DLL已存在于C:\\Program Files\\Common Files\\Microsoft Shared\\OFFICE14\\

Reinstalling "Microsoft Access Database Engine 2010 Redistributable" quit without indicating any error, but Windows Event Log indicated a problem, and looking at the install log file, it appears that there was some version mismatch ("Another version of this product is already installed"). 重新安装“Microsoft Access数据库引擎2010可再发行组件”退出而不指示任何错误,但Windows事件日志指示存在问题,并查看安装日志文件,似乎有一些版本不匹配(“已安装此产品的另一个版本” )。
So, I uninstalled "Microsoft Access database engine 2010" from "Program and Features", and then reinstalled it. 因此,我从“程序和功能”中卸载了“Microsoft Access数据库引擎2010”,然后重新安装它。 Now it installed ok. 现在安装好了。
This resulted in the registry key HKEY_CLASSES_ROOT\\Microsoft.ACE.OLEBD.12.0 being added, and my copy of ACEOLDBD.DLL being replaced with an earlier version (14.0.7011.1000 from 14.0.7159.5000). 这导致添加了注册表项HKEY_CLASSES_ROOT\\Microsoft.ACE.OLEBD.12.0 ,并且我的ACEOLDBD.DLL副本被替换为早期版本(14.0.7011.1000从14.0.7159.5000)。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Microsoft.ACE.OLEDB.12.0 提供程序未注册 - Microsoft.ACE.OLEDB.12.0 provider is not registered Microsoft.ACE.OLEDB.12.0提供程序未注册 - Microsoft.ACE.OLEDB.12.0 provider is not registered ''Microsoft.ACE.OLEDB.12.0' 提供程序未在本地计算机上注册。' - 'The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.' “未在本地计算机上注册'Microsoft.ACE.oledb.12.0'提供程序的在线错误。” - online error of “The 'Microsoft.ACE.oledb.12.0' provider is not registered on the local machine.” 在没有可重新分发数据库引擎的情况下解决“ microsoft.ace.oledb.12.0'提供程序未在本地计算机上注册” - Solving “microsoft.ace.oledb.12.0' provider is not registered on the local machine” without the DB Engine Redistributable Microsoft.ACE.OLEDB.12.0 提供程序未在本地计算机上注册,即使它确实已安装 - The Microsoft.ACE.OLEDB.12.0 provider is not registered on the local machine even if it actually IS installed Microsoft.ACE.OLEDB.12.0'提供程序未在C#应用程序的本地计算机上注册错误 - Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine error in C# application 可怕的'Microsoft.ACE.OLEDB.12.0'提供程序未在Visual Studio 2017中注册 - The dreaded 'Microsoft.ACE.OLEDB.12.0' provider is not registered in Visual Studio 2017 'Microsoft.ACE.OLEDB.12.0'提供程序未在本地计算机上注册',而无需安装Access Engine - 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine' without need to install Access Engine “Microsoft.ACE.OLEDB.12.0”提供程序未在本地计算机 Office 365 上注册 - 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine Office 365
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM