Dev License: This installation of WHMCS is running under a Development License and is not authorized to be used for production use. Please report any cases of abuse to abuse@whmcs.com

How do I use an Access database on my site? Print

  • 6

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\mysite.com\db\mydatabase.mdb;"
Set dbCon = Server.CreateObject("ADODB.Connection")
dbCon.Open strConnection
Set rst = dbCon.Execute("SELECT * FROM MyTable;")

Was this answer helpful?

Powered by WHMCompleteSolution