CRecordset::DoBulkFieldExchange

virtual void DoBulkFieldExchange( CFieldExchange* pFX );
throw( CDBException );

Parameters

pFX

A pointer to a CFieldExchange object. The framework will already have set up this object to specify a context for the field exchange operation.

Remarks

When bulk row fetching is implemented, the framework calls this member function to automatically transfer data from the data source to your recordset object. DoBulkFieldExchange also binds your parameter data members, if any, to parameter placeholders in the SQL statement string for the recordset's selection.

If bulk row fetching is not implemented, the framework calls DoFieldExchange. To implement bulk row fetching, you must specify the CRecordset::useMultiRowFetch option of the dwOptions parameter in the Open member function.

Note   DoBulkFieldExchange is available only if you are using a class derived from CRecordset. If you have created a recordset object directly from CRecordset, you must call the GetFieldValue member function to retrieve data.

Bulk record field exchange (Bulk RFX) is similar to record field exchange (RFX). Data is automatically transferred from the data source to the recordset object. However, you cannot call AddNew, Edit, Delete, or Update to transfer changes back to the data source. Class CRecordset currently does not provide a mechanism for updating bulk rows of data; however, you can write your own functions by using the ODBC API function SQLSetPos.

Note that ClassWizard does not support bulk record field exchange; therefore, you must override DoBulkFieldExchange manually by writing calls to the Bulk RFX functions. For more information about these functions, see the topic Record Field Exchange Functions.

For an example of how to implement bulk record field exchange, see the sample DBFETCH. For more information about bulk row fetching, see the article Recordset: Fetching Records in Bulk (ODBC). For related information, see the article Record Field Exchange (RFX). Both articles are in Visual C++ Programmer’s Guide.

CRecordset OverviewClass MembersHierarchy Chart

See Also   CRecordset::m_nFields, CRecordset::m_nParams, CRecordset::DoFieldExchange, CRecordset::GetFieldValue, CFieldExchange, Record Field Exchange Functions