Microsoft.ACE.OLEDB.12.0 Provider 在 Windows 8 下无法再打开 .mdb [英] Microsoft.ACE.OLEDB.12.0 Provider can no longer open .mdb under Windows 8
问题描述
我有一个 x64 应用程序,它使用 Microsoft.ACE.OLEDB.12.0 提供程序读取 Windows 7 (x64) 上的 MS Access 数据库,并且运行良好(安装了 Office 2010).
I have an x64 application which uses Microsoft.ACE.OLEDB.12.0 provider to read an MS Access Database on Windows 7 (x64) and it works fine (Office 2010 installed).
在安装了 Office 2013 的 Windows 8 下运行的同一应用程序失败,并显示一条消息,指出提供商无法打开以前的版本.
The same application running under Windows 8 with Office 2013 installed, fails with a message saying that the provider cannot open previous versions.
在安装了 Office 2013 的 Windows 8 下,还有 Microsoft.ACE.OLEDB.15.0,但我已经仔细检查了我的代码并确定它在连接字符串中指定了 12.0.
Under Windows 8 with Office 2013 installed, there is also Microsoft.ACE.OLEDB.15.0, but I have double checked my code and certain that it is specifying the 12.0 in the connection string.
这个提供者是否有不同的版本" - 或者我遗漏了什么?
Are there different "versions" of this provider -or is there something I've missed?
我在 Windows 8 下重新编译了一个使用 x86 平台的测试程序,并将提供程序更改为 Microsoft.Jet.OLEDB.4.0,然后一切正常.不幸的是,该模块是一个更大的生态系统的一部分,需要能够在 x64 下运行(特别是 excel 的插件),并且应用程序从供应商的网站下载访问数据库,所以它是转换数据库或将所有内容更改为 x86 不切实际.
I have recompiled a test program under Windows 8 for using x86 platform, and changed the provider to Microsoft.Jet.OLEDB.4.0 and it all works again. Unfortunately, the module is part of a bigger ecosystem that needs to be able to be run under x64 (specifically an plug in to excel), and the access database is downloaded by the suite from a supplier's web site by the application, so it is not practical to convert the database or change everything to x86.
提前致谢.
推荐答案
我突然想到检查每个提供程序使用的文件版本,并通过注册表搜索,发现在干净的 Windows 8 安装下,使用 Office2013 安装,两个提供程序都指向同一个程序集.
It occurred to me to check the versions of files being used for each provider, and hunting through the registry, found that under a clean Windows 8 install, with Office 2013 installed, both providers point to the same assembly.
(C:Program FilesCommon Filesmicrosoft sharedOFFICE15ACEOLEDB.DLL)
(C:Program FilesCommon Filesmicrosoft sharedOFFICE15ACEOLEDB.DLL)
然后我下载并运行了 Microsoft Access Database Engine Redistributable (http://www.microsoft.com/en-us/download/details.aspx?id=13255) 然后将正确版本的 12.0 提供程序安装到 C:Program FilesCommon Filesmicrosoft sharedOFFICE14ACEOLEDB.DLL 并且应用程序按预期运行.
I then downloaded and ran the Microsoft Access Database Engine Redistributable (http://www.microsoft.com/en-us/download/details.aspx?id=13255) which then installed the proper version of the 12.0 provider into C:Program FilesCommon Filesmicrosoft sharedOFFICE14ACEOLEDB.DLL and the application is behaving itself as expected.
MS 包含一个标记为 12.0 的提供商,但其行为不再像 12.0,这似乎很奇怪.
It would seem strange that MS have included a provider branded as 12.0 that doesn't behave like 12.0 any more.
无论如何 - 希望能帮助某人从 4-5 小时的头发拉...
Anyway - hope that helps someone from 4-5 hours of hair pulling...
克雷格
这篇关于Microsoft.ACE.OLEDB.12.0 Provider 在 Windows 8 下无法再打开 .mdb的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!