Share via


Record Field Exchange: Using RFX

OverviewHow Do IFAQSampleODBC Driver List

This article explains what you do to use RFX in relation to what the framework does.

****Note   ****This article applies to classes derived from in which bulk row fetching has not been implemented. If you are using bulk row fetching, then bulk record field exchange (Bulk RFX) is implemented. Bulk RFX is similar to RFX. To understand the differences, see the article Recordset: Fetching Records in Bulk (ODBC).

The following articles contain related information:

The following table shows your role in relation to what the framework does for you.

Using RFX: You and the Framework

You... The framework...
Declare your recordset classes with ClassWizard. Specify names and data types of field data members. ClassWizard derives a CRecordset class and writes a override for you, including an RFX function call for each field data member.
(Optional) Manually add any needed parameter data members to the class. Manually add an RFX function call to DoFieldExchange for each parameter data member, add a call to for the group of parameters, and specify the total number of parameters in . See Recordset: Parameterizing a Recordset (ODBC).
(Optional) Manually bind additional columns to field data members. Manually increment . See Recordset: Dynamically Binding Data Columns (ODBC).
Construct an object of your recordset class. Before using the object, set the values of its parameter data members, if any. For efficiency, the framework prebinds the parameters, using ODBC. When you pass parameter values, the framework passes them to the data source. Only the parameter values are sent for requeries, unless the sort and/or filter strings have changed.
Open a recordset object using . Executes the recordset’s query, binds columns to field data members of the recordset, and calls DoFieldExchange to exchange data between the first selected record and the recordset’s field data members.
Scroll in the recordset using or a menu or toolbar command. Calls DoFieldExchange to transfer data to the field data members from the new current record.
Add, update, and delete records. Calls DoFieldExchange to transfer data to the data source.

See Also   Record Field Exchange: How RFX Works, Recordset: Obtaining SUMs and Other Aggregate Results (ODBC), , ,