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.
The code i used for the .mdb connection that worked perfectly.
<%@Language=VBScript %>
<%
Dim adoCon
Dim rsLogbook
Dim strSQL
Set adoCon = Server.CreateObject("ADODB.Connection")
adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("DatabaseName.mdb")
Set rsLogbook = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT TableName.FieldName FROM TableName;"
rsLogbook.Open strSQL, adoCon
Response.Write ("<br>")
Response.Write (rsLogbook("FieldName"))
rsLogbook.Close
Set rsLogbook = Nothing
Set adoCon = Nothing
%>
I tried replacing the ".mdb" with "accdb" but no luck. Any help is appreciated :)