title: Using Access Databases with razor mvc4
body: <p>I have a Microsoft Access Database (.accdb) full of values that I wish to display in a table on my .cshtml razor page. I need to open the connection and then make the table with the values.</p>
  
  <p>I think that the table would be something like this:</p>
  
  <pre><code>&lt;table&gt;
          &lt;thead&gt;
              &lt;tr&gt;
                  &lt;th&gt;Name&lt;/th&gt;
                  &lt;th&gt;Address&lt;/th&gt;
                  &lt;th&gt;Address 2&lt;/th&gt;
                  &lt;th&gt;Field of Work&lt;/th&gt;
              &lt;/tr&gt;
          &lt;/thead&gt;
  
         &lt;tbody&gt;
              @foreach (var row in _____.Query(____))
              {
                  &lt;tr&gt;
                      &lt;td&gt;@row.name&lt;/td&gt;
                      &lt;td&gt;@row.address&lt;/td&gt;
                      &lt;td&gt;@row.address2&lt;/td&gt;
                      &lt;td&gt;@row.field&lt;/td&gt;
                  &lt;/tr&gt;
              }
          &lt;/tbody&gt;
    &lt;/table&gt;
  </code></pre>
  
  <p>, but I have not been able to open the connection correctly. </p>
  
  <p>Advice please?</p>