Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
636 views
in Technique[技术] by (71.8m points)

ms access - Microsoft.ACE.OLEDB.12.0 Provider can no longer open .mdb under Windows 8

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).

The same application running under Windows 8 with Office 2013 installed, fails with a message saying that the provider cannot open previous versions.

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?

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.

Thanks in advance.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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)

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.

It would seem strange that MS have included a provider branded as 12.0 that doesn't behave like 12.0 any more.

Anyway - hope that helps someone from 4-5 hours of hair pulling...

Craig


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...