[英]The Microsoft.ACE.OLEDB.12.0 provider is not registered on the local machine even if it actually IS installed
I try to connect.accdb file as a data source to my Windows Form application in Visual Studio.我尝试将 connect.accdb 文件作为我在 Visual Studio 中的 Windows 窗体应用程序的数据源。 It keep saying the Microsoft.ACE.OLEDB.12.0 provider is not registered on the local machine.它一直说 Microsoft.ACE.OLEDB.12.0 提供程序未在本地计算机上注册。
Error screenshot plus listed OleDb enumeratos错误截图加上列出的 OleDb 枚举
I have installed all the recommended runtimes on related Answers marked as Accepted/working:我已经在标记为已接受/工作的相关答案上安装了所有推荐的运行时:
but still the same issue.但仍然是同样的问题。
Setting the x86/x64 platform in Windows Forms project did not help.在 Windows 窗体项目中设置 x86/x64 平台没有帮助。
Setup:设置:
There really is strange mixture of platforms.确实存在奇怪的平台组合。 I have installed all the necessary available within 64 bit and the connection resulted in "The Microsoft.ACE.OLEDB.12.0 provider is not registered on the local machine".我已经在 64 位中安装了所有必要的可用程序,连接导致“Microsoft.ACE.OLEDB.12.0 提供程序未在本地计算机上注册”。
When I tried to install the 86 bit version, I got the " You cannot install the 32-bit version of Microsoft Access Database Engine because you currently have 64-bit Office products installed... ": Setup Runtime error当我尝试安装 86 位版本时,出现“您无法安装 32 位版本的 Microsoft Access 数据库引擎,因为您当前安装了 64 位 Office 产品... ”:安装运行时错误
I followed the Merav Kochavi's advice to run the also the 32 bit version setup using /passive parameter (" AccessDatabaseEngine.exe /passive ") and it went without the error message and now IT WORKS!我听从了Merav Kochavi 的建议,使用 /passive 参数(“ AccessDatabaseEngine.exe /passive ”)也运行了 32 位版本设置,并且没有出现错误消息,现在可以正常工作了! Test connection succeeded.测试连接成功。
Thank you all for help!谢谢大家的帮助!
If it helps anyone else, I was having the same issue.如果它对其他人有帮助,我也遇到了同样的问题。 One Project would work, but not the other.一个项目可行,但另一个不行。 I went to Add/Remove Programs, Uninstalled Microsoft Access database engine 2010. Then I reinstalled it with the MSI (NOT the 64 bit one).我去了添加/删除程序,卸载了 Microsoft Access 数据库引擎 2010。然后我用 MSI(不是 64 位的)重新安装它。 Here is the link to MSI: https://www.microsoft.com/en-us/download/details.aspx?id=13255这是 MSI 的链接: https ://www.microsoft.com/en-us/download/details.aspx?id=13255
Lastly, in VS, still make sure that you click Project, Properties and check the box for Prefer 32-bit.最后,在 VS 中,仍然确保单击“项目”、“属性”并选中“首选 32 位”复选框。 Cheers!干杯!
As long as you check the Prefer 32-bit
option, this problem is overcome if you have run the Microsoft Access database engine
20xx.exe
file to register the engine.只要勾选Prefer 32-bit
选项,运行Microsoft Access database engine
20xx.exe
文件注册引擎就可以解决这个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.