Share via


Data Access: ADO and RDO

Two underlying technologies support data-source or data-bound controls:

ADO

ADO is a COM wrapper of OLE DB that facilitates writing data access applications (consumers). OLE DB is a COM-based universal data access technology, allowing you to use any data source, not just indexed, sequential access methods (ISAMs) and SQL-based databases.

OLE DB providers can access data from a variety of data sources and is not limited to SQL queries to retrieve data but rather can use queries as defined in the provider.

RDO

RDO is the COM wrapper of ODBC. ODBC, a C-based API, allows general-purpose (heterogeneous) data access. However, RDO relies on SQL as the command language to access data.

As of this writing, Microsoft does not plan to further develop RDO. For this reason, you may consider using the ADO-based data-access controls rather than the RDO data-access controls.

The main differences between ADO and RDO data controls are:

Data-Bound Controls

RDO data-bound controls use the ICursor interfaces; ADO controls use the OLE DB IRowset interface. In both cases, the interfaces used by the controls return a rowset.

The RDO-based data-bound controls were designed to work best with Visual Basic. As such, some functionality of RDO data-bound controls, most notably in formatting, is not available in Visual C++ made applications. This problem is not present in the ADO databinding controls.

Data-Source Controls

ADO data-source controls implement the IDataSource interface and RDO data-source controls implement the IVBDSC interface. You can call an IDataSource method to receive an IRowset interface pointer. Similarly, you can call an IVBDSC method to get an ICursor interface pointer.

Back to Databinding with ActiveX Controls in Visual C++.