What You Can Do With ADO
ADO is designed to provide developers with a powerful, logical object model for programmatically accessing, editing, and updating a wide variety of data sources through OLE DB system interfaces. The most common usage of ADO is to query a table or tables in a relational database, retrieve and display the results in an application, and perhaps allow users to make and save changes to the data. Other things that can be done programmatically with ADO include:
- Querying a database using SQL and displaying the results.
- Accessing information in a file store over the Internet.
- Manipulating messages and folders in an e-mail system.
- Saving data from a database into an XML file.
- Allowing a user to review and make changes to data in database tables.
- Creating and reusing parameterized database commands.
- Executing stored procedures.
- Dynamically creating a flexible structure, called a Recordset, to hold, navigate, and manipulate data.
- Performing transactional database operations.
- Filtering and sorting local copies of database information based on run-time criteria.
- Creating and manipulating hierarchical results from databases.
- Binding database fields to data-aware components.
- Creating remote, disconnected Recordsets.
ADO must expose a wide variety of options and settings in order to provide such flexibility. Therefore it's important to take a methodical approach to learning how to use ADO in an application, breaking down each of your goals into manageable pieces.
Four primary operations are involved in most ADO programs: getting data, examining data, editing data, and updating data. The next four chapters examine each of these operations in more detail.
Before proceeding, familiarize yourself with the objects in the ADO Object Model. Then review HelloData: A Simple ADO Application. This application is written in Visual Basic and performs each of the four primary ADO operations.