Appendix J. ActiveX Data Objects

ActiveX Data Objects (ADO) is a data access component from Microsoft that you can use by VBScript running under a variety of hosts, including Active Server Pages and the Windows Script Host. ADO was the primary data access component used by VBScript, Visual Basic, and Visual C++ developers in the years before Microsoft introduced the .NET platform. While ADO is no longer in the spotlight, it is a very mature data access component that is still supported by Microsoft. Better yet, it's a safe bet that ADO is available by default on most installations of Windows. You can use ADO in your VBScript programs to write to and read from structure data sources such as databases like Access, Oracle, and SQL Server as well as spreadsheets and flat files.

ADO is too large a subject to cover thoroughly in one appendix. Therefore, the purpose here is not to discuss the details and powerful features of ADO, but rather, because ADO is so often used in combination with VBScript, to give a brief overview and reference. This overview assumes that you are familiar with basic relational database concepts such as tables, columns, queries, stored procedures, and so on. If you make significant use of ADO in your scripts, you may want to purchase a book dedicated to ADO. This guide to ADO covers ADO 2.8, the latest version of ADO at press time.

The appendix discussion includes the ADO objects shown in the following table.

Object

Purpose

Connection

Connects to a data source and manages ...

Get VBScript Programmer's Reference, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.