Partager via


DFX_LongBinary

Important   It is recommended that you use DFX_Binary instead of this function.

void AFXAPI DFX_LongBinary(
   CDaoFieldExchange* pFX,
   LPCTSTR szName,
   CLongBinary& value,
   DWORD dwPreAllocSize = AFX_DAO_LONGBINARY_DEFAULT_SIZE,
   DWORD dwBindOptions = 0 
);

Parameters

  • pFX
    A pointer to an object of class CDaoFieldExchange. This object contains information to define the context for each call of the function.

  • szName
    The name of a data column.

  • value
    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 CLongBinary, is taken from the specified data member. For a transfer from data source to recordset, the value is stored in the specified data member.

  • dwPreAllocSize
    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.

  • dwBindOptions
    An option that lets you take advantage of MFC's double buffering mechanism for detecting recordset fields that have changed. The default, AFX_DISABLE_FIELD_CACHE, does not use double buffering. The other possible value is 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.

    Notes

    You can control whether data is double buffered by default by setting CDaoRecordset::m_bCheckCacheForDirtyFields.

Remarks

DFX_LongBinary is provided for compatibility with the MFC ODBC classes. The DFX_LongBinary function transfers binary large-object (BLOB) data using class CLongBinary between the field data members of a CDaoRecordset object and the columns of a record on the data source. Data is mapped between type DAO_BYTES in DAO and type CLongBinary in the recordset.

Example

See DFX_Text.

Requirements

Header: afxdao.h

See Also

Reference

DFX_Text

DFX_Bool

DFX_Currency

DFX_Long

DFX_Short

DFX_Single

DFX_Double

DFX_DateTime

DFX_Byte

CDaoFieldExchange::SetFieldType

CLongBinary Class

Concepts

MFC Macros and Globals