How to connect to an Access Database without DSN or ODBC
-
Synopsis
This guide will show you how to connect to an Access Database without DSN or ODBC. -
Applicable to
All SherWeb Web hosting accounts -
Prerequisite
- A Windows Web hosting plan with SherWeb
-
How to
To work on your databases, insert the following code in your ASP pages:
- Long path for the database:
dbPath = Server.MapPath("/rep_depro/ma_base.mdb")
- Object creation for connection
Set Conn = Server.CreateObject("ADODB.Connection")
Connection:
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)};" _
& " DBQ=" & dbPathFor the connection, we suggest creating a file named _connection.asp and to include it at the beginning of your pages. We also recommend doing the same for the disconnection. -
Keywords
Web, access, database



