'Microsoft.ACE.OLEDB.12.0' provider is not

2019-04-14 23:55发布

问题:

I get the following exception

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

though I have installed

'Microsoft.ACE.OLEDB.12.0' 
  • In my local dev machine I have also office 2010

What is wrong?

回答1:

If you system is 64 bit,Then you have to change your pool settings to allow 32 bit applications that is OLEDB. ,then this link might help.

http://help.webcontrolcenter.com/KB/a1114/how-to-enable-32-bit-application-pool-iis-7-dedicatedvps.aspx



回答2:

refer posts it was explained you need to install office drivers first

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

http://social.msdn.microsoft.com/Forums/en-US/1d5c04c7-157f-4955-a14b-41d912d50a64/how-to-fix-error-the-microsoftaceoledb120-provider-is-not-registered-on-the-local-machine



回答3:

I have searched for a solution to this issue for a long time and finally i did find.

My System: IIS (Version 7.5.7600.16385) is running on a 64-bit.

First you have to install "AccessDatabaseEngine" you can find the exe below

http://www.microsoft.com/en-us/download/details.aspx?id=13255

After you install it to your server you have to do one more thing.

Go to your application pool and change "Managed pipeline mode" to Classic.

That's it!!

Now you can use "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=[SOURCE];Extended Properties=Excel 12.0;" connection string



回答4:

convert to data base to .mdb. To convert you .accdb file to .mdb check this link convert and change connection string like this

<add name="ConnectionString4" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:/HostingSpaces/persistanceplus/doaminname.com/wwwroot/Database3.mdb"/>

this is best solution of this problem.



回答5:

It may be problem with your project configuration settings. If it set to Any CPU it cannnot work properly. You should specify x86 or x64 configuration (depends on installed OLE provider version. Detailed instruction here



回答6:

Right click on the project and select the bottom most option that is properties, and uncheck "prefer 32-bit" in build tab

Thanks and Regards, Rk_Hirpara