HomeASP HostingWeb DesignRegister DomainSupportAbout Us

FAQ
Support :: FAQ


How to connect to MS Access database from ASP
Before you can access your MS Access database from ASP, you need to connect to it using one of the following methods:

1. Connect to a Microsoft Access Database using DSN-less connection OLE-DB

Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" &
Server.MapPath("your_database_name.mdb") & ";"
objConn.Close
Set objConn = Nothing


2. Connect to a Microsoft Access Database using DSN-less connection ODBC

Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" &
Server.MapPath("your_database_name.mdb") & ";UID=;PWD="
objConn.Close
Set objConn = Nothing


3. Connect to a Microsoft Access Database using a DSN

Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "DSN=your_dsn_name;UID=;PWD="
objConn.Close
Copyright 2001-2004 Art Branch Inc.