Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

Data Exchange for Record Views

When you use Add Class to map the controls in a record view's dialog template resource to the fields of a recordset, the framework manages data exchange in both directions — from recordset to controls and from controls to recordset. Using the DDX mechanism means that you do not have to write the code to transfer data back and forth yourself.

DDX for record views works in conjunction with:

  • RFX for recordsets of class CRecordset (ODBC).

  • DFX for recordsets of class CDaoRecordset (DAO).

Although they differ in implementation, at the interface level RFX and DFX are very similar data exchange mechanisms. The DAO version, DFX, is modeled closely on the earlier ODBC version, RFX. If you know how to use RFX, you know how to use DFX.

RFX and DFX move data between the current record of the data source and the field data members of a recordset object. DDX moves the data from the field data members to the controls in the form. This combination fills the form controls initially and as the user moves from record to record. It can also move updated data back to the recordset and then to the data source.

The following figure shows the relationship between DDX and RFX (or DFX) for record views.

Dialog Data Exchange and Record Field Exchange

Dialog Data Exchange Record Field Exchange

For more information about DDX, see Dialog Data Exchange and Validation. For more information about RFX, see Record Field Exchange (RFX).

Community Additions

ADD
Show:
© 2015 Microsoft