Share via


CFieldExchange

CFieldExchange does not have a base class.

The CFieldExchange class supports the record field exchange (RFX) and bulk record field exchange (Bulk RFX) routines used by the database classes. Use this class if you are writing data exchange routines for custom data types or when you are implementing bulk row fetching; otherwise, you will not directly use this class. RFX and Bulk RFX exchanges data between the field data members of your recordset object and the corresponding fields of the current record on the data source.

Note   If you are working with the Data Access Objects (DAO) classes rather than the Open Database Connectivity (ODBC) classes, use class CDaoFieldExchange instead. For more information, see the articles and in Visual C++ Programmer's Guide.

A CFieldExchange object provides the context information needed for record field exchange or bulk record field exchange to take place. CFieldExchange objects support a number of operations, including binding parameters and field data members and setting various flags on the fields of the current record. RFX and Bulk RFX operations are performed on recordset-class data members of types defined by the enumFieldType in CFieldExchange. Possible FieldType values are:

  • CFieldExchange::outputColumn for field data members.

  • CFieldExchange::inputParam or CFieldExchange::param for input parameter data members.

  • CFieldExchange::outputParam for output parameter data members.

  • CFieldExchange::inoutParam for input/output parameter data members.

Most of the class’s member functions and data members are provided for writing your own custom RFX routines. You will use SetFieldType frequently. For more information, see the articles and in Visual C++ Programmer's Guide. For information about bulk row fetching, see the article in Visual C++ Programmer's Guide.For details about the RFX and Bulk RFX global functions, see Record Field Exchange Functions in the Macros and Globals section in this manual.

#include <afxdb.h>

Class MembersHierarchy Chart

Sample   

See Also   CRecordset