Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine

People also ask

How do you solve the Microsoft Jet Oledb 4.0 provider is not registered on the local machine?

4.0 provider is not available as a 64-bit component, it was only developed as a 32-bit component. To solve the problem: Install 64-bit drivers to access your database. Microsoft Access 64-bit drivers are available for download from Microsoft Web site.

How do I get Microsoft Jet Oledb 4.0 provider?

You can download this driver from https://www.microsoft.com/en-us/download/details.aspx?id=13255, then change the provider to “Provider=Microsoft. ACE. OLEDB.


I found a solution for this problem. The issue I described in my question occured basically due to the incompatibility of the Microsoft.Jet.OLEDB.4.0 driver in 64 bit OS.

So if we are using Microsoft.Jet.OLEDB.4.0 driver in a 64 bit server, we have to force our application to build in in 32 bit mode (This is the answer I found when I did an extensive search for this known issue) and that causes other part of my code to break.

Fortunately, now Microsoft has released a 64 bit compatible 2010 Office System Driver which can be used as replacement for the traditional Microsoft.Jet.OLEDB.4.0 driver. It works both in 32 bit as well as 64 bit servers. I have used it for Excel file manipulation and it worked fine for me in both the environments. But this driver is in BETA.

You can download this driver from Microsoft Access Database Engine 2010 Redistributable


If the issue persist in ASP.NET,All I had to do was change the "Enable 32-bit Applications" setting to True, in the Advanced Settings for the Application Pool.


I have the same problem

Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine

I applied the answer by neo but it did not work until I change the provider to “Provider=Microsoft.ACE.OLEDB.12.0;” in connection string.

Hope this will help if some one face the same issue.


I know it's quite old questions and many persons has answered. but I am summarizing the things for understanding:

If the file extension is xls and OS is 32 bit then only you can use "Microsoft.Jet.OLEDB.4.0". Microsoft has not released 64 bit version of this driver.

If file extension is xlsx or OS is 64 bit then you must have to use "Microsoft.ACE.OLEDB.12.0". The application compiled in 32/64 bit mode does not impact the selection of driver.

Always install the 64 bit driver of Microsoft.ACE.OLEDB.12.0 on OS 64 bit. If you have already installed Office 32 bit then you need to run driver from cmd with /passive argument. This hack works till Office 2013 only, Microsoft stopped this workaround from Office 2016 for Microsoft.ACE.OLEDB.16.0 drivers.

AccessDatabaseEngine_x64.exe /passive

Download drivers Microsoft.ACE.OLEDB.12.0

private void ProcessFile(string path)
{
    string connString = string.Empty;

    if (Path.GetExtension(path).ToLower().Trim() == ".xls" && Environment.Is64BitOperatingSystem == false)
        connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + path + ";Extended Properties=\"Excel 8.0;HDR=Yes;IMEX=2\"";
    else
        connString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + path + ";Extended Properties=\"Excel 12.0;HDR=Yes;IMEX=2\"";
}

If Application is compiled with AnyCPU flag, it will look for 64 bit Access drivers on 64 bit OS and 32 bit access drivers on 32 bit OS.


I've the same message, I have a webpage with do on visual studio 2010, I read a file.xls on that page,in my project visual has not any problem, when I put it on my IIS local throw me a 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine' ,I fixed that problem next following this steps,

1.-Open IIS
2.-Change the appPool on Advanced Settings
3.-true to enable to 32-bit application.

and that's all

ps.I changed Configuration Manager to X86 on Active Solution Platform


If your application runs on localIIS, You can solve this problem by enabling 32-bit applications in AppPool's Advanced Settings

enter image description here


I had the same issue. I changed the application configuration to x86, then it worked!