RDO vs. DAO

Basically, you can use the RDO in a way that is similar to the way you use the Jet database engine DAO. With RDO, you can submit queries, create a resultset or a cursor, and process the results from the query using database-independent, object-oriented code.

Some of the objects have different names that reflect the underlying ODBC API. For example, the DAO Workspace object provides capabilities that are similar to the rdoEnvironment object, and the DAO Database object is replaced by the rdoConnection object. In many ways, the RDO and DAO object models are similar in function and operation. However, there are significant differences that are a result of RDO being more tightly coupled to ODBC and of RDO being oriented to client/server databases rather than to desktop databases.

Jet’s table-type Recordset object permits direct access to an entire table using a selected ISAM index. Although you can simulate this with RDO, it requires the creation of a cursor that spans the entire table, which is generally impractical. The DAO and Jet model also provides the ability to create a forward-only–scrolling, snapshot-type recordset. This option is similar to an RDO forward-only resultset except that the forward-only rdoResultset can be updatable.

RDO refers to rows instead of records and to columns instead of fields (rows and columns are the generally accepted terms used for relational databases). The data returned from an RDO query is in the form of resultsets, which can contain zero or more data rows composed of one or more columns.

Some DAO objects, methods, and properties are designed to implement and support the ISAM structure of Jet and installable ISAM databases. For example, you can use the Index object and the Seek method to manage ISAM indexes and locate rows based on these indexes. But because the RDO and relational databases manage indexes in an entirely different manner, it isn’t possible to implement these ISAM structure DAO objects in RDO.

Jet also supports the creation and modification of the database schema through DAO methods and properties. RDO doesn’t support any type of schema modification because such modification is fully supported in the tools and utilities provided with the server systems. But in RDO you can still run make-table queries or execute action queries that create, modify, or delete databases and tables using native SQL statements. You can also execute complex stored procedures that manage the database schema or perform maintenance operations that aren’t possible to perform with DAO.