1

I'm using VS 2012 & Office 2013 64 bits, and i changed the target platform to x86, but I still got this weard error

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

Liam
  • 27,717
  • 28
  • 128
  • 190
  • 1
    Possible duplicate of ['Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine](http://stackoverflow.com/questions/6649363/microsoft-ace-oledb-12-0-provider-is-not-registered-on-the-local-machine) – Liam Nov 08 '16 at 11:24
  • Well after 5 days researching, i concluded that this work only for MS-ACCESS 2010, that's it. – Anis Ben Khiroun Nov 08 '16 at 15:20
  • It worked for MS-ACCESS 2013 after installing (AccessDatabaseEngine2010 and 2007).. thanks for your help :) – Anis Ben Khiroun Nov 08 '16 at 17:03

1 Answers1

1

You need to download two components:

1) microsoft access database engine 2) Office System Driver: Data Connectivity Components

After these installations your application will start to work. Furthermore, following link is better to use on access to database:

void test()
{ 
string connStr = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\\Database1.accdb;Persist Security Info=False;";
            OleDbConnection conn = new OleDbConnection(baglantiCumlesi);
            conn.Open();
            conn.Close();
}
tdog
  • 482
  • 3
  • 17
  • So what you mean is just install Office 2010, because simply Provider=Microsoft.ACE.OLEDB.12.0 is compatible just for ACCESS 2010 or 2007. – Anis Ben Khiroun Nov 08 '16 at 15:22
  • Thats what i did in a project few months ago :) I hope you find better solutions. – tdog Nov 08 '16 at 16:28