ADO ISAPI Sample

Microsoft ActiveX Data Objects (ADO)

ADO ISAPI Sample

ADOISAPI demonstrates how to use ADO from C/C++ ISAPI extensions with Microsoft Internet Information Services. It is installed to c:\Platform SDK\Samples\DataAccess\ado\isapi.

This sample establishes a connection to a database, retrieves data, formats the data as an HTML table, and returns the data back to the client's browser. The connection to the database in this sample is cached for better performance.

To run ADOISAPI

  1. Copy isapi.dll to some directory on the Web server computer with execute access.

  2. Copy adoisapi.htm to the same directory on the Web server computer with read access.

  3. Set up an ODBC system DSN on the Web server computer called OLE_DB_NWind_Jet. Click Start, point to Programs, and point to Administrative Tools. Choose Data Sources (ODBC).

  4. On the System DSN tab, click Add. Select "Microsoft Access Driver (.mdb)" from the list of available drivers. Click Finish.

  5. In the ODBC Microsoft Access Setup dialog box, enter "OLE_DB_NWind_Jet" in the Data Source Name box. In the Description box, enter "MDAC SDK Sample Data."

  6. Under Database, click Select and locate <drive>:\Platform SDK\Samples\DataAccess\ado\xml. Select Nwind.mdb. Click OK.

  7. In the ODBC Microsoft Access Setup dialog box, click OK. Click OK again in the ODBC Data Source Administrator dialog box.

  8. An installation to the C: drive is assumed in the import path for msado15.dll on line 14. If necessary, modify this with the device to which ADO is installed (for example, "D:\...").

    Note   When linking this sample with Visual C++ 6.0, you may receive linker warning LNK4089. This is simply because ADOISAPI defaults to "Maximize Speed" optimizations under Visual C++ 6.0. These warnings can be ignored.