Skip to content

Latest commit

 

History

History
33 lines (28 loc) · 2.18 KB

data-exchange-for-record-views-mfc-data-access.md

File metadata and controls

33 lines (28 loc) · 2.18 KB
title Data Exchange for Record Views (MFC Data Access) | Microsoft Docs
ms.custom
ms.date 11/04/2016
ms.reviewer
ms.suite
ms.technology
cpp-windows
ms.tgt_pltfrm
ms.topic article
dev_langs
C++
helpviewer_keywords
RFX (record field exchange), data exchange mechanism
RFX (record field exchange), record views
record views, data exchange
DDX (dialog data exchange), record views
RFX (record field exchange)
ms.assetid abc52ca7-6997-47a7-98f3-f347f52b1f72
caps.latest.revision 9
author mikeblome
ms.author mblome
manager ghogen
ms.workload
cplusplus
data-storage

Data Exchange for Record Views (MFC Data Access)

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). RFX moves 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 for record views.

Dialog-data exchange and record-field exchange
Dialog Data Exchange and Record Field Exchange

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

See Also

Record Views (MFC Data Access)
ODBC Driver List