title: Transfer tables from one MS Access database to another using C#
body: <p>I have two almost same databases (both are *.mdb), but one of them has few new tables. Now I can only detect tables, that should be imported, using code below:</p>
  
  <pre><code>    public static List&lt;string&gt; GetDBTables(string path)
      {
          List&lt;string&gt; allTables = new List&lt;string&gt;();
          String connect = ("Provider=Microsoft.JET.OLEDB.4.0;data source=" 
                                       + path + ";Persist Security Info=False;");
  
          OleDbConnection con = new OleDbConnection(connect);
          con.Open();
  
          DataTable tables = con.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, 
                                       new object[] { null, null, null, "TABLE" });
  
          int counter = 1;
          foreach (DataRow row in tables.Rows)
          {
              allTables.Add(row[2].ToString());
              counter++;
          }
          con.Close();
  
          return allTables;
      }
  
      var withNewTables = GetDBTables(".\\one.mdb");
      var withoutNewTables = GetDBTables(".\\another.mdb");
      var NotFoundTables = withNewTables.Except(withoutNewTables).ToList();
  </code></pre>
  
  <p>How can I import these tables in the old database using C #?</p>