The RDO Object Model


The RDO object model is designed as a thin wrapper around the ODBC interface, providing a Visual Basic object model to the interface that can be used with all of the Visual Basic bound controls. In a lot of ways, the RDO object model is very similar to the DAO object model. The primary difference between the two is that the DAO object model was designed around ISAM (Indexed Sequential Access Method, also known as Flat-File) database access, while the RDO object model was designed for SQL (Structured Query Language) database access. This means that DAOs are well suited for working with databases like dBase, FoxPro, and Paradox, while RDOs are better suited for use with databases like SQL Server, Oracle, and Sybase.

The RDO object model consists of the following objects:

The relationships between these objects are shown in Figure 23.9.

Figure 23.9

The RDO object model, showing the relationships between the objects, is very similar to the DAO object model.

For the most part, RDOs can be used in much the same way that DAOs are used. The following are a few notable differences that must be taken into account:

In Table 23.1, you can see the RDO objects and their corresponding DAO objects.

Table 23.1 - RDO Objects and Their Corresponding DAO Objects

RDO Objects

DAO Objects

rdoEngine

DBEngine

rdoError

Error

rdoEnvironment

Workspace

rdoConnection

Database

rdoTable

TableDef

N/A

Index

rdoResultset

Recordset

- N/A

- Table-type

- Keyset-type

- Dynaset-type

- Static-type

- Snapshot-type

- Dynamic-type

- N/A

- Forward-only

- Forward-only

- (cursorless)

- N/A

rdoColumn

Field

rdoQuery

QueryDef

rdoParameter

Parameter

N/A

Relation

N/A

Group

N/A

User

This provides you with a quick comparison of RDO and DAO object models, and hopefully provides you with an understanding of how you can build on your existing understanding of DAOs to use RDOs to build database applications in Visual Basic.