Book Review: Beginning Visual Basic 6 Databases
Let's take a quick look at the properties of an ADO data control and a standard data control. Bring up the property window for the ADODC data control:
Notice that with the ADO data control, we have the connection string that
tells the control which OLE DB provider to use. This string contains the fully qualified
name and location of the database to open. And then the .RecordSource property tells the
control which table to open - in our case Publishers. And since we want to open a table,
instead of a dynaset from a join, the .CommandType of adCmdTable is selected. Take another
look at the ConnectionString - notice that the OLEDB 3.51 provider is listed.
The DAO and ADO Data Control Properties Compared
Let' have a look back at the DAO data control's properties by way of comparison with ADO:
The standard DAO data control shown here uses the .DatabaseName property to reference the fully qualified name and location of the database. The .Connect property tells the control to use the installable ISAM file for connecting with Access (remember that there are options here for Paradox. FoxPro, etc.) And the .RecordSource property is the same. We selected Publishers. Notice that the .RecordsetType is 0 - Table. So we include the exact same information to the control, but it is located in different properties. But the ADO data control can do so much more with the same information.
Page 8 of 23