This browser does not support basic Web standards, preventing the display of our site's intended design. May we suggest that you upgrade your browser?

Web Development Code Library ASPConnect to MS Access using ASP

Connect to MS Access using ASP

This is a very fast way to connect to a Microsoft Access database. This code provides much more secure access and is the recommended way to make your connection.

Sub MakeDBConnection(strPath)

  Set objCon = Server.CreateObject("ADODB.Connection")

  'objCon is our connection from the web server to the database engine
  'use the OPEN method and specify the driver for the database, along
  'with the name of our database file
        
  objCon.open("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & strPath & ";")

End Sub
Excellence. Our Measure. Our Motto. Our Goal.