title: Connect Access Database from c#
body: <p>I’m trying to open Access database. </p>
  
  <pre><code>OleDbConnection conn = null;
  OleDbDataReader reader = null;
  
  
  conn = new OleDbConnection(
      "Provider=Microsoft.ACE.OLEDB.12.0; " +
      "Data Source=" + @"C:\test.accdb");
  conn.Open();
  </code></pre>
  
  <p>But on conn.Open, I’m getting exception -  Unrecognized database format "C:\test.accdb"</p>
  
  <p>Im’ created this db with Access 2010. So, I’m tried to Access this db using this:
  <a href="http://www.microsoft.com/en-us/download/details.aspx?id=13255" rel="nofollow">http://www.microsoft.com/en-us/download/details.aspx?id=13255</a>
  But then I’m get exception „Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.”
  Now I’m trying this: <a href="http://www.microsoft.com/en-us/download/details.aspx?id=23734" rel="nofollow">http://www.microsoft.com/en-us/download/details.aspx?id=23734</a> And getting this Unrecognized database format exception.</p>