Executive Summary:
Learn about the primary Microsoft ActiveX Data Objects (ADO) objects—Connection, Command, Parameter, Recordset, and Field—and follow example scripts that demonstrate how to use ADO within VBScript.
|
Microsoft ActiveX Data Objects (ADO) provides a data access model that lets you use a similar approach for working with data from various data sources. For example, you can use ADO within VBScript to access a database in Microsoft SQL Server, Microsoft Access, or another relational database management system (RDBMS). You can even access data in a Microsoft Excel spreadsheet.
ADO, which is based on COM, acts as an interface between the program or scripting language and an OLE DB provider. The ADO objects let you connect to a data source, issue a command against that source, and retrieve data into a recordset, which you can view or modify without calling the data source repeatedly. In this article, I introduce you to the primary ADO objects and provide examples that demonstrate how to use ADO within VBScript. (For definitions of several ADO terms, see the sidebar “ADO Acronyms.”) . . .

