I'm trying to get data from an Excel file on a button click event. My connection string is:
string connString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\source\\SiteCore65\\Individual-Data.xls;Extended Properties=Excel 8.0;";
When I click on the button, I got the following error:
The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.
I have no clue how to fix this. My operating system is Windows 7.
Just download & install the following Access DB engine (X86 or X64: as per your machine configuration) and see the magic :)
https://www.microsoft.com/en-us/download/confirmation.aspx?id=13255
I had Microsoft Access Database Engine 2010 Redistributable already installed on my machine but was still receiving the Microsoft ACE OLEDB Provider error.
Then I recalled that I had upgraded to Office 2016 recently, so, may be I should try reinstalling Microsoft Access Database Engine 2010 Redistributable. And that fixed the problem on my machine.
So, if you have upgraded to different version of MS Office or even repaired/reinstalled your MS Office then try reinstalling Microsoft Access Database Engine 2010 Redistributable before wasting time with finding other fixes. Good luck!
It depends with the office you have installed, if you have x64 bit office then you must compile the application as a x64 to allow it to run, so if you want it to run on x36 then you must install office x86 to accept, i tried all the solutions above but none worked until when i realised i had office x64bit and so i built the application as x64 and worked
The way I solved it on different computers:
I have a Windows 7 32bit machine with Visual Studio 2012 which did not have the Access Database because I do not have the Office 2010. I copied the same source I had in my Windows 7 64bit machine.
So, I installed the AccessDatabaseEngine into this Windows 7 32 bit machine after downloading it per above suggestions from others here and everything worked fine.
I still had the problem on my Windows 7 64 bit machine which already has Office 2010 that already includes Access 2010. The way I solved on this computer was by going into the PROJECT, selected Properties, and at Platform target had Any CPU I checked Prefer 32-bit. Recompiled/Build and the Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine message was gone.
The first thing you need to check is your build configuration of your application.
If you have built your project under x86 platform, then in order to resolve you issue you should install the following packages on your machine:
In order to use the 'Microsoft.ACE.OLEDB.12.0' provider you must install the Microsoft Access Database Engine 2010 Redistributable first, this installation is available at: http://www.microsoft.com/download/en/details.aspx?id=13255 .
After the installation has complete, try running you application, if this solves the issue great, if not, continue to step 2.
This next step is an unexplained workaround, which works for Office 2010, even though it is the Data Connectivity Components of Office 2007. I am not quite sure why this works, but it does and this has been proven to work in almost all cases. You need to install the 2007 Office System Driver: Data Connectivity Components, this installation is available at: http://www.microsoft.com/download/en/confirmation.aspx?id=23734 .
After this installation is complete, try running your application, this should resolve the issue.
If you are trying to run an application built under x64 or AnyCPU platform, I would recommend first validating that it runs as expected under the x86 platform. In the event that it does not run under that x86 platform, perform the steps in the first part and validate that it runs as expected.
I did read that the MS Access drivers including the OLEDB Database driver works only under the x86 platform and is incompatible under the x64 or AnyCPU platform. But this appears to be untrue. I validated my application was running when building x86, then I installed the Access Database Engine using the passive flag.
After these 2 steps I managed to run my application after building in x64 or AnyCPU build configuration. This appeared to solve my issue.
Note: The order of the steps seems to make a difference, so please follow accordingly.
I followed the instructions set out by others; installing this patch, installing that patch as well as the Microsoft Access Database Engine 2010.
My issue was that I'm using the same library (linq2sql) in 2 sites on my machine; 1 works and 1 doesn't.
Eventually I found that I had to "enable 32 bit applications" in the advanced settings of the apppool for my non-working site.
Everything works fine now.