English


English


Knowledge base

Connect to Microsoft Access databases via ADO + ODBC


KB-LJW-DB-107



  




Related articles and resources




Microsoft Access drivers installed on our servers




What are Microsoft Access Databases?




How to manage and administer Access databases




How to access MS Access databases from Classic ASP


 Click to sort columns
ElementMicrosoft.Jet.OLEDB.4.0Microsoft.ACE.OLEDB.12.0Microsoft Access Driver (*.mdb)Microsoft Access Driver (*.mdb, *.accdb)
TypeOLE DB ProviderOLE DB ProviderODBC DriverODBC Driver
EngineJET (Jet Database Engine)ACE (Access Database Engine)JET (Jet Database Engine)ACE (Access Database Engine)
Supported formats.mdb only.accdb and .mdb.mdb only.mdb and .accdb
Access via ADONative and directNative and directIndirect (ADO via ODBC)Indirect (ADO via ODBC)
PerformanceIdentical to ACEIdentical to JetLower (ODBC layer)Lower (ODBC layer)
32-bit
Compatibility
 Yes No Yes No
64-bit
Compatibility
 No Yes No Yes
Usage.mdb in 32 bits64 bits (recommended)Fallback/compatibility solutionFallback/compatibility solution
Year introduced19982007Legacy Access / ODBC heritageLegacy Access / ODBC heritage


Direct connection without DSN via an ODBC Driver or OLE DB Provider



Microsoft.Jet.OLEDB.4.0

ASP CLASSIC
<%
'Establish a connection to the Access database via the JET OLE DB 4 Provider
'Available for 32-bit Application Pools
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; DATA SOURCE=base.mdb;"
%>



Microsoft.ACE.OLEDB.12.0

ASP CLASSIC
<%
'Establish a connection to the Access database via the ACE OLE DB Provider 12 (or 14, or 16)
'Available for 64-bit Application Pools
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "Provider=Microsoft.ACE.OLEDB.12.0; DATA SOURCE=base.mdb;"
%>



Microsoft Access Driver (*.mdb, *.accdb)

ASP CLASSIC
<%
'Establish a connection to the Access database via the ODBC driver.
'Available for 32-bit Application Pools.
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "Driver={Microsoft Access Driver (*.mdb)}; Dbq=base.mdb; Uid=Admin; Pwd=;"
%>

ASP CLASSIC
<%
'Establish a connection to the Access database via the ODBC driver.
'Available for 64-bit Application Pools.
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "Driver={Microsoft Access Driver (*.mdb, *.accdb)}; Dbq=base.accdb; Uid=Admin; Pwd=;"
%>



Connection via a DSN





Tips and special cases with Microsoft Access



Database corruption & Backups




Default cursor



Maximum size of 2 GB




Compacting and maintenance







Locking management (*.ldb and *.laccdb files)




Migration to MariaDB








At the service of your ASP Classic





Privacy preferencesYour privacy preferences

NOTE: Your changes will be applied from the next page you will visit/load.

Your privacy is precious: we respect it.

By using this website, you consent that we use technologies such as anonymous statistics and cookies to improve your browsing experience on our site, customise content, and analyse our traffic. This anonymous information may be shared with our trusted social media and analytics partners.

  • We do not collect any nominative data.
  • We do not store any password.
  • We use a high-end secure connection.