'ACE.OLEDB.12.0' is not registered on the local machine.

F6CQI -  
 Anonymous user -

Hello,

I get this message when I run programs developed with Visual Studio 2022 on my new computer. I am using Office 365 and Access database. These programs work fine on my old PC. What should I do?

Thank you in advance

1 réponse

Anonymous user
 

Hello,

Here are the steps to resolve the "ACE.OLEDB.12.0 is not registered on the local machine" issue, with more readable links:


---

1. Install the Microsoft Access Database Engine

Download and install the Microsoft Access Database Engine 2016 Redistributable from the official Microsoft website:
https://www.microsoft.com/en-us/download/details.aspx?id=54920

Choose the version that corresponds to your system:

AccessDatabaseEngine_X64.exe for a 64-bit system.

AccessDatabaseEngine.exe for a 32-bit system.


---

2. Check the architecture (32 or 64 bits)

Make sure your application is using the same architecture (32 or 64 bits) as the installed Access driver. If your Visual Studio targets a different architecture, you will need to adjust your configuration.

In Visual Studio:

1. Go to Project Properties.


2. Under Compile > Target Platform, choose either x86 or x64 to match the installed driver.


---

3. Modify the connection string

If you are using Office 365, replace Microsoft.ACE.OLEDB.12.0 with Microsoft.ACE.OLEDB.16.0 in your connection string. Example:

Dim connectionString As String = "Provider=Microsoft.ACE.OLEDB.16.0;Data Source=C:\path\to\your_database.accdb;Persist Security Info=False;"


---

4. Check permissions

Ensure that your application has the necessary permissions to access the database and the installed components.


---

5. Reinstall or repair Office 365

If the problem persists, reinstalling or repairing Office 365 may resolve potential conflicts with the OLEDB components. To do this:

Go to Control Panel > Programs > Programs and Features.

Select Microsoft Office 365, then click on Change and choose Online Repair.

0