title: Connect accdb database using asp-classic
body: <p>Im trying to connect a database to my webpage using asp-classic. I was successful before when i was using a .mdb file but now i have a new database that is in the format of accdb and needs to be because of a feature that is not supported in the .mdb file. </p>
  
  <p>The code i used for the .mdb connection that worked perfectly.</p>
  
  <pre><code>&lt;%@Language=VBScript %&gt;
  &lt;%
  Dim adoCon
  Dim rsLogbook
  Dim strSQL
  Set adoCon = Server.CreateObject("ADODB.Connection")
  adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &amp; Server.MapPath("DatabaseName.mdb")
  Set rsLogbook = Server.CreateObject("ADODB.Recordset")
  strSQL = "SELECT TableName.FieldName FROM TableName;"
  rsLogbook.Open strSQL, adoCon
  Response.Write ("&lt;br&gt;")
  Response.Write (rsLogbook("FieldName"))
  rsLogbook.Close
  Set rsLogbook = Nothing
  Set adoCon = Nothing
  %&gt;
  </code></pre>
  
  <p>I tried replacing the ".mdb" with "accdb" but no luck. Any help is appreciated :)</p>