(Contents)(Previous)

Programming with the RDO~Data Model

The Enterprise version of the Visual Basic 4.0 programming environment provides a valuable alternative to using the ODBC API, i.e. the remote data object (RDO). This programming model, which is in addition to the existing DAO interface, was created in order to provide application programmers with a lightweight alternative to the ODBC API that allow you to access characteristics and options of server databases that are not compatible with the Jet Engine and DAO programming model.

RDO is available only in the 32-bit variant of the Enterprise version of VB 4.0. Therefore, no programs that use RDO can be generated for the 16-bit Microsoft Windows 3.1 and Microsoft Windows for Workgroups platforms.

RDO has important benefits:

· RDO is an extremely thin layer ("object wrapper") over the ODBC interface that has practically no adverse effects on performance. RDO does require some memory, but significantly less than the Jet Engine.

· There is one data control that uses RDO, which serves to supplement the advantages of this lightweight interface with all the bound controls.

· Any existing ODBC driver can be used with RDO because RDO does not extend the defined ODBC interface (Level II).

· As with the ODBC API, all server database options can be fully exploited.

· SQL statements that return a number of result sets can be executed more easily than via the ODBC API.

· Unlike other libraries, RDO follows the object-oriented approach of Visual Basic. Thus, the "for each" statement can be applied to the columns of a result set.

Many useful characteristics that are familiar from the DAO programming model (record sets, databases, etc.) can be found in a similar form in RDO, making the "culture shock" with regard to well-known techniques less apparent. Thus, it offers corresponding collections of tables, columns and result sets that can be accessed as usual.

Aids to Decision-making

RDO is a useful programming model for applications that do not necessarily require the Jet Engine and justify the greater effort required because of their degree of usefulness. SQL programming in AdaBasic, which serves to generate DB procedures, DB functions and triggers, is also based on the RDO interface.

The higher programming effort as compared to the DAO interface is rewarded by improved performance. Professional applications that exploit the possibilities of the server database beyond what is permitted by the Jet Engine also rely on ODBC API programming or on the RDO programming model. Another benefit in addition to performance is the option of storing procedures on the server database that encapsulate multiple processing steps for the purpose of permanently modeling business transactions and taking security aspects into account. The necessity of leaving the convenient abstraction level of the DAO model is made more acceptable by RDO.


(Contents)(Previous)