Wednesday, September 2, 2009
The 'Microsoft.ACE.OLEDB.12.0' provider is not registered error
I have recently worked on system that used access 2007. As we know it uses oledb driver to connect. If we do not have access 2007 installed we need to install Data Connectivity Components provided by Microsoft. Well, everything went fine on the developer machine until we tried to deploy to the server. At first it started throwing exception "Microsoft.ACE.OLEDB.12.0' provider is not registered", which was normal - Data Connectivity Components were not installed. But despite we installed the driver it continue throw the same error. It turned out that the problem is located in the x64 architecture of the server. Microsoft.ACE.OLEDB.12.0 does not work in x64 environment. So, our solution was to target the application to x86 platform. This will force the application to run in 32bit environment. This can be accomplished using configuration manager section in Visual Studio.