Transfers arrays of bytes between the field data members of a CDaoRecordset object and the columns of a record on the data source.
void AFXAPI DFX_Binary( CDaoFieldExchange* pFX, LPCTSTR szName, CByteArray& value, int nPreAllocSize = AFX_DAO_BINARY_DEFAULT_SIZE, DWORD dwBindOptions = 0 );
A pointer to an object of class CDaoFieldExchange. This object contains information to define the context for each call of the function.
The name of a data column.
The value stored in the indicated data member — the value to be transferred. For a transfer from recordset to data source, the value, of type CByteArray, is taken from the specified data member. For a transfer from data source to recordset, the value is stored in the specified data member.
The framework preallocates this amount of memory. If your data is larger, the framework will allocated more space as needed. For better performance, set this size to a value large enough to prevent reallocations. The default size is defined in the AFXDAO.H file as AFX_DAO_BINARY_DEFAULT_SIZE.
An option that lets you take advantage of MFC's double buffering mechanism for detecting recordset fields that have changed. The default, AFX_DAO_DISABLE_FIELD_CACHE, does not use double buffering, and you must call SetFieldDirty and SetFieldNull yourself. The other possible value, AFX_DAO_ENABLE_FIELD_CACHE, uses double buffering, and you do not have to do extra work to mark fields dirty or Null. For performance and memory reasons, avoid this value unless your binary data is relatively small.
You can control whether data is double buffered for all fields by default by setting CDaoRecordset::m_bCheckCacheForDirtyFields.