How do I use an Access database on my site?

Microsoft Access is part of the Microsoft Office suite of applications and is a database that is suitable for low-usage web sites. The Access database is stored in an MDB file, e.g. "mydatabase.mdb".  

Although there are many different ways of using an Access database we have documented an example for the convenience of our users. This knowledgebase article is a specific example, and you will need to adjust file names and other things as appropriate. This example is how to connect to an Access database from an ASP script.
Dim dbCon
Dim rst
Dim strConnection
strConnection = "PROVIDER=Microsoft.Jet.OLEDB.4.0; DATA SOURCE=c:\domains\\db\mydatabase.mdb;"
Set dbCon = Server.CreateObject("ADODB.Connection")
dbCon.Open strConnection
Set rst = dbCon.Execute("SELECT * FROM MyTable;")
  • 5 Users Found This Useful
Was this answer helpful?

Related Articles

Connection Strings (MSSQL 2005, MSSQL 2008, MySQL5, MS Access Database)

MSSQL2005Set conn = Server.CreateObject("ADODB.Connection")conn.Open "Provider=SQLOLEDB; Data...

Getting "The 'microsoft.jet.OLEDB.4.0' provider is not registered on the local machine."

When you host on the 64bit servers you might get an "The 'microsoft.jet.OLEDB.4.0' provider is...

Import Export MySQL database using PhpMyAdmin

Do the following steps for import/export mysql database: Open going to...

What is MySQL?

MySQL is an open source database server, much like Microsoft SQL Server or Oracle. You can store...