JavaScript EditorDhtml editor     Free javascript download 

Main Page

The MFC ODBC database classes automate moving data between the data source and a recordset object. When you derive a class from CRecordset and do not use bulk row fetching, data is transferred by the record field exchange (RFX) mechanism.


If you have implemented bulk row fetching in a derived CRecordset class, the framework uses the bulk record field exchange (Bulk RFX) mechanism to transfer data. For more information, see Recordset: Fetching Records in Bulk (ODBC).

RFX is similar to dialog data exchange (DDX). Moving data between a data source and the field data members of a recordset requires multiple calls to the recordset's DoFieldExchange function and considerable interaction between the framework and ODBC. The RFX mechanism is type-safe and saves you the work of calling ODBC functions such as ::SQLBindCol. For more information about DDX, see Dialog Data Exchange and Validation.

RFX is mostly transparent to you. If you declare your recordset classes with the MFC Application Wizard or Add Class (as described in Adding an MFC ODBC Consumer), RFX is built into them automatically. Your recordset class must be derived from the base class CRecordset supplied by the framework. The MFC Application Wizard lets you create an initial recordset class. Add Class lets you add other recordset classes as you need them. For more information and examples, see Adding an MFC ODBC Consumer.

You must manually add a small amount of RFX code in three cases, when you want to:

If you need a more advanced understanding of RFX, see Record Field Exchange: How RFX Works.

The following topics explain the details of using recordset objects:

See Also


Adding an MFC ODBC Consumer


Database Support, MFC Application Wizard
CRecordset Class


Open Database Connectivity (ODBC)
Recordset (ODBC)

JavaScript EditorDhtml editor     Free javascript download