When you refer to ADO objects, you do so in the same way you would using DAO, but the difference is that ADO does not have a native connection like DAO.
Recall that in DAO you can use the DBEngine(0)(0) object or the CurrentDb() function to return a reference to the current database. ADO does not have a current database. In fact, it doesn't know anything about dataset; it only knows about data sources through a provider. Therefore, in ADO, you must always implement a connection to an external data store through a provider.
As you may recall from Chapter 6, an object's parent collection can have a default member that you can refer to. The following table lists the default members for those ADO objects that have them.
Object library | Collection | Default member | Example |
---|---|---|---|
ADODB | Command | Parameters | cmd(0) |
Record | Fields | rcADO(0) | |
Recordset | Fields | rsADO(0) | |
ADOX | Catalog | Tables | cat(0) |
Table | Columns | cat.tables(0)(0) cat(0)(0) |
18.223.33.157