At this point in your ADO learning curve, a detailed list of properties, enumerations of constant values, methods, and events of ADO components might appear premature. Understanding the capabilities and benefits of ADO, however, requires familiarity with ADO's repertoire of properties, methods, and events. To get the most out of ADP and to program DAP you must have a working knowledge of ADO programming techniques. DAO objects don't fire events; ADO objects do. Access objects offer fine-grained events, but don't provide programmers with a lower-level event model for basic operations, such as connecting to a database and executing queries. Access 97's ODBCDirect offered an event model, but you couldn't bind ODBCDirect Recordsets to forms. ADO offers a complete and very fine-grained event model. Object Browser is the most useful tool for becoming acquainted with the properties, methods, and events of ADODB objects. Object Browser also is the most convenient method for obtaining help with the syntax and usage of ADO objects, methods, and events. Note
To use Object Browser with ADO objects, follow these steps:
ADO type libraries also include enumerations (lists) of numeric (usually Long) constant values with an ad prefix. These constant enumerations are specific to one or more properties. Figure 30.12 shows Object Browser displaying the members of the ConnectModeEnum enumeration for the Mode property of an ADODB.Connection object. The lower pane displays the Long value of the constant. Figure 30.12. Object Browser displays in the status pane the numeric value of members of ADO enumerations, which are a collection of related ADO constant values.
Tip You can substitute the numeric value of enumerated constants for the constant name in VBA, but doing so isn't considered a good programming practice. Numeric values of the constants might change in subsequent ADO versions, causing unexpected results when upgrading applications to a new ADO release. |