Microsoft Access and ASP connection script for Windwos 2008 / 2012 shared hosting

If your website is hosted on our Windows 2008 or Windows 2012 shared hosting server, you will have to use the following database connection string to use Microsoft Access database with ASP script.

Sample 1

strCN = "DRIVER={Microsoft Access Driver (*.mdb)};" & _
            "DBQ="& server.mappath("database.mdb") &""
Set objCN = Server.CreateObject("ADODB.Connection")
objCN.Open strCN
response.write("connection successful")

Sample 2

Dim objConn
Set objConn=Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\domains\your-user-name\your-website-name\data\database-file-name.mdb;"

  • 0 Users Found This Useful

Was this answer helpful?

Related Articles

How to send email through CDONTS Email?

CDONTS stands for "Collaboration Data Objects for Windows NT Server" and as the name suggests it...

How to use ASPUpload?

ASPUpload is a COM+ component, which enables an ASP application to capture, save and process the...

How to send Emails via ASP using SMTP authentication?

This topic includes the sample code to send email from ASP.Net using C# code :Sample Code :<%@...

ASPJpeg support on Windows 2008 / 2012 servers

Yes, we have installed ASPJpeg component on Windows 2008 and Windows 2012 shared hosting servers....

MySQL ODBC driver on Windows 2008 / 2012 server

We have installed MySQL 5.1 ODBC driver on Windows 2008 / 2012 shared hosting server.