ActiveX Data Objects Samples

Five samples are provided to illustrate the features of Microsoft ActiveX Data Objects (ADO).

The following is a summary of the ADO samples.

Sample

Description

Getrows

Shows how to use the GetRows method to retrieve multiple rows from a database.

Employee

Demonstrates scrolling through a database; adding, deleting, and updating rows.

Adoread

Tests performance of different cursor types. Various parameters may be specified.

Adoisapi

(HTML page) Shows how to use ADO and ISAPI to access a database. Requires the Internet Information Server.

Adovbs

(HTML page) Shows how Visual Basic Script and ADO to browse through a database.

GetRows:

This sample demonstrates using the Getrows method to retrieve multiple rows of data from a database.

A simple dialog is presented. When the "Execute" button is pushed, a list box is populated with employee names and ID numbers.

The source is in \oledbsdk\ado\samples\getrows.

The executable is \oledbsdk\ado\bin\getrows.exe.

Employee:

This sample presents a dialog that allows you view each record of the employee database; scroll to different records; and add, delete, or update records.

The source is in \oledbsdk\ado\samples\employee.

The executable is \oledbsdk\ado\bin\employee.exe.

Adoread:

This sample tests the performance of different cursor types. You may specify data source name, login information, connect mode and options, number of rows to retrieve; execution of a table, query or SQL statement; cache size, and cursor type. The time required to execute the test is displayed.

The source is in \oledbsdk\ado\samples\read.

The executable is \oledbsdk\ado\bin\adoread.exe.

Adoisapi:

This sample shows how to write an Internet Server API (ISAPI) DLL to request records from a database. It requires the Microsoft Internet Information Server to process the request.

The user interface is an HTML page presented by an Internet browser. The page contains a form where you may enter an SQL statement. The statement is sent to the Internet Information Server which calls ADOISAPI.DLL. The DLL uses the SQL statement to open a recordset. The recordset data is sent to the Internet Information Server, formatted into and HTML table, then sent back to the browser.

The source is in \oledbsdk\ado\sam­ples\isapi.

The HTML page is \oledbsdk\ado\sam­ples\isapi\­adoisapi.htm.

The executable is \oledbsdk\ado\bin\adoisapi.dll.

Adovbs:

This sample shows how Visual Basic Script (VBS) can be used with ADO.

The user interface is an HTML page presented by an Internet browser capable of supporting VBS and ADO. ADO is used to access the Products table and populate a recordset. VBS is used to support scrolling through the recordset, dynamically building the HTML form, and displaying data from the recordset.

The HTML page is \oledbsdk\ado\samples\adovbs\adovbs.htm.