DFX_Short

void AFXAPI DFX_Short( CDaoFieldExchange* pFX, LPCTSTR szName, short& value, DWORD dwBindOptions = AFX_DAO_ENABLE_FIELD_CACHE );

Parameters

pFX

A pointer to an object of class CDaoFieldExchange. This object contains information to define the context for each call of the function. For more information about the operations a CDaoFieldExchange object can specify, see the article DAO Record Field Exchange: How DFX Works in Visual C++ Programmer’s Guide.

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

dwBindOptions

An option that lets you take advantage of MFC’s double buffering mechanism for detecting recordset fields that have changed. The default, AFX_DAO_ENABLE_FIELD_CACHE, uses double buffering. The other possible value is AFX_DAO_DISABLE_FIELD_CACHE. If you specify this value, MFC does no checking on this field. You must call SetFieldDirty and SetFieldNull yourself.

These options are explained further in the article DAO Recordset: Binding Records Dynamically in Visual C++ Programmer's Guide.

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

Remarks

The DFX_Short function transfers short integer data 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_I2 in DAO and type short in the recordset.

Note   DFX_Short is equivalent to RFX_Int for the ODBC-based classes.

Example

See DFX_Text.

See Also   DFX_Text, DFX_Bool, DFX_Currency, DFX_Long, DFX_Single, DFX_Double, DFX_DateTime, DFX_Byte, DFX_Binary, DFX_LongBinary, CDaoFieldExchange::SetFieldType