I am trying to connect to an access Data base MS 2013 through the code and here is the code that i used
" OleDbConnection MyAccessConn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\\Test.accdb;");
MyAccessConn.Open(); "
and when i run the programmed it gives me this Error
"
An unhandled exception of type 'System.InvalidOperationException' occurred in System.Data.dll
Additional information: The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine. "
Please Help

Anoop Kumar SharmaPosted Feb 6, 2014, 11:18 AM
Method 1:Right Click on solution->Click on Configuration Manager-> and change your Active Solution Platform to x86 (click on new and then select platform and then OK). Build your project again(compile it again). If this will not work for you try 2nd Method
Method 2:Click on this link and install the Microsoft Access Database Engine 2010 Redistributable
http://www.microsoft.com/en-us/download/details.aspx?id=13255
Download and install it and then again try (If this will not work then try method 3rd)Method 3:(This method solved my problem). I prefer you to try this method before trying 2nd method because this method not only solved my problem as well as many people having the same Error. For your information I have Windows 8 (x64 bit) and using Access 2013.
Go to the below link and download and install file (2007 Office System Driver: Data Connectivity Components)
http://www.microsoft.com/en-us/download/confirmation.aspx?id=23734
Hope this will also help you
Regards:
Anoop Kumar Sharma
Mohammed RizkPosted Feb 12, 2014, 4:11 AM