How to fix Microsoft.ACE.OLEDB.12.0 provider is not registered on the local machine

Rhys Mckinnon 31 Reputation points
2021-03-03T03:33:06.02+00:00

After trying to follow several solutions online none seem to be working. I'm using 64bit Microsoft access and 2019 visual studio and have already installed the engine from https://www.microsoft.com/en-au/download/details.aspx?id=13255. I've tried running visual studio on x86 and any cpu. Stumped on where to go next

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,395 questions
{count} votes

8 answers

Sort by: Oldest
  1. Abdelmalek Aitouche 176 Reputation points
    2021-03-03T11:56:14.95+00:00

    Hi gents,

    I have gone through the same issue after installing several Access, ADODB runtime redistributables but still had the same problem.
    The solution is:
    Go to project properties
    Compile Tab
    Scroll down to Advanced Compile Options
    Target CPU: change between x86 , x64 and AnyCPU validate your selection and run debug to test.
    I hope this will solve your issue.
    Best regards,
    A. Aitouche

    8 people found this answer helpful.

  2. Thomas 31 Reputation points
    2021-09-06T07:35:33.153+00:00

    After some updates of Windows 10 and migration to Office 365 I did this:

    • Installing AccessDatabaseEngine_X64.exe (which did not directly solve the issue)
    • Visual Studio 2019: Project > <Project_Name> Properties > Target CPU > 'x64'

    Thank you A. Aitouche!

    6 people found this answer helpful.

  3. Max Santeramo 21 Reputation points
    2022-06-02T15:16:55.177+00:00

    I run into the same problem but nothing seems to work. I run windows 10 and Visual Studio 2022. All is 32bits including office but no matter what I always get hte bloody OLED12 service provider not registered issue. I also tried the previous solution but there's no way, it doesn't work. Also if I try to install the 64 bit version of AccessDatabaseEngine is raises an error due to the different bitness. What can I do? Thanks for your support.


  4. Mark Finn 6 Reputation points
    2022-08-31T16:57:10.353+00:00

    I have this problem every time I get a new laptop.

    As has been said, you have to install the Microsoft library here and set the platform target appropriately, but setting that target is not as simple as you would expect. It is NOT sufficient to change the solution target (in the drop-down at the top of the Visual Studio window) because, for some reason, that does not always set the targets of the underlying projects to the same value. In particular, when the solution target is AnyCPU, the project target default is correct (AnyCPU), but when the solution target is x86, the project target inexplicably defaults to x64. You need to go into the properties of all projects which use the Microsoft library and make sure the project target is set to what you want.

    Is there a reason for this strange behavior, or is it a bug? Who knows? Hopefully, though, this will help some of you out there. It is a very annoying problem that rarely comes up, so it's hard to remember the fix.

    1 person found this answer helpful.

  5. REGIE CLARIN 6 Reputation points
    2022-10-26T16:33:55.833+00:00

    the microsotf.ACE.OCLEDB 12.0 provider is not register on the local machine

    1 person found this answer helpful.