ADO is a specially designed Microsoft technology used to access databases from web pages. Some working knowledge of Microsoft Access and VB Script is required to understand this tutorial fully.

In ASP people use ADO (ActiveX database objects) to get data from database. ADODB is comprised of 3 main objects: Connection, RecordSet, Command. We would discuss the first two in this tutorial. The ADODB.Connection object opens up an ODBC or OLEDB connection to a database through database drivers to perform operations in the database. For this, you first have to create an instance of the object:

When you are finished up with the connection you can clean up:

Conn is basically a reference to the connection, which you can name any way. Next, you have to open up a database. This can be done by either using a Data Source Name (DSN) or a connection string. Common method among the developers is connection string because DSN required a setup by administrator. A DSN is really just a shortcut name for a connection string. But with a connection string, you can move your database around without having to change the DSN. There are two connection strings. One uses ODBC the other uses OLEDB. We will use OLEDB since it is faster and simpler. An example:

The code uses the Server.MapPath() function to get the physical path. In case of password protected database:

Finally, the connection to the database is opened by using the open property, as follows:

This pretty much completes the retrieval of data from the required web pages. This process does not require much expertise but it does require understand of Microsoft Access and VBScript.

Looking for a quality hosting service? here are a few I suggest.
BlueHost | HostGator | Media Temple
Ali has been an entrepreneur in web, video and related technologies. Having worked with many business across the globe, Ali stands truly a great pillar in the business working with him.