title: Using Access 2010 database in c#
body: <p>I am currently accessing a access 2010 database in c# and its unable to open the database as it doesn't seem to have the correct driver when I was using a .mdb this worked, but now since I'm using a .accdb it doesn't seem to want to open the database.  Here's the opening code.  I was wondering if there was anything you could help me with?</p>
  
  <pre><code>public void openDatabase(string dbname)
      {
          //dataBaseName = dbname;
          dataBaseName = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=houses.accdb"; //Defines the location of the database and its type.
  
          connection = new OleDbConnection(dataBaseName); //Creates a new OleDbConnection using the data from dataBase.
  
          connection.Open(); //Opens the TCP/IP connection.
      }`enter code here`
  </code></pre>