简体   繁体   中英

'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine Office 365

I know this has been posted a number of times, but I have tried all the solutions given and to no avail.

Two machines, both win 10, both running Office 365, visual studio 2019

Create a simple DB in access

Install the Access redistributable (have tried every variant in testing), but VS 2019 won't talk to it giving me the above error. Interestingly a third machine which had an older version of Office and is running VS 2017 works fine. It has then been upgraded to Office 365 and still works fine.

I've put in a reference for access and also tried inserting the database as a data source to get the connection string, but no joy. I've tried changing the connection string because the DB has come from 365 and again no joy.

There are other forum links to solve this and in the past (when running previous versions of office), those resolutions have worked perfectly, but since using office 365 machines, it isn't playing nicely.

thanks in advance

ok- after many hours of hunting and trying, sods law, I find the answer immediately after posting it here.

Scroll down this thread on the Microsoft site and it explains why the connection test from VS doesn't work (giving a false sense of your connection not working) and how to get your app to work.

https://social.msdn.microsoft.com/Forums/office/en-US/44f542b1-a24a-4fbb-8788-f62c28e2ffac/office-2019-connection-string?forum=accessdev

finally some success

But does the bit-nes of the installed driver match your application?

You can check out what is installed and usable with a tiny tool from Albert Kallal :

Access Looker

Just launch it – it will let you browse to a accdb or mdb file – and see if you can use it and connect. Both a x86 and x64 bit .net are in the zip file.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM