So far, this chapter has mostly discussed automatic ways to set up ADO Connection,
Command, and Recordset objects using Data Environment Designers or the ADO Data
For most serious applications, however, you will need to directly program the
ADO object model in VB code.
To program ADO objects directly, you must set your VB project to refer to the
latest version of the Microsoft ActiveX Data Objects Library from the Project,
References menu dialog box, as shown in Figure 8.24.
FIGURE 8.24 Setting a project reference to the ADO Library.
You basically have three main concerns when you program with ADO in VB:
Setting up and maintaining a connection to data with the Connection object
Retrieving rows or otherwise manipulating the data with the Recordset object,
the Command and Parameter objects, or the Connection object
Determining the exact behavior and nature of the rows of data returned by a
Connection or Command and manipulating the data's individual fields and rows with
the Recordset and Field objects
The following sections discuss the programming of these ADO objects.