Поделиться через


CRecordset::IsFieldDirty

Determines whether the specified field data member has been changed since Edit or AddNew was called.

BOOL IsFieldDirty( 
   void * pv  
);

Параметры

  • pv
    A pointer to the field data member whose status you want to check, or NULL to determine if any of the fields are dirty.

Возвращаемое значение

Nonzero if the specified field data member has changed since calling AddNew or Edit; otherwise 0.

Заметки

The data in all dirty field data members will be transferred to the record on the data source when the current record is updated by a call to the Update member function of CRecordset (following a call to Edit or AddNew).

ПримечаниеПримечание.

This member function is not applicable on recordsets that are using bulk row fetching. If you have implemented bulk row fetching, then IsFieldDirty will always return FALSE and will result in a failed assertion. For more information about bulk row fetching, see the article Recordset: Fetching Records in Bulk (ODBC).

Calling IsFieldDirty will reset the effects of preceding calls to SetFieldDirty since the dirty status of the field is re-evaluated. In the AddNew case, if the current field value differs from the pseudo null value, the field status is set dirty. In the Edit case, if the field value differs from the cached value, then the field status is set dirty.

IsFieldDirty is implemented through DoFieldExchange.

For more information on the dirty flag, see the article Recordset: How Recordsets Select Records (ODBC).

Исключения

This method can throw exceptions of type CMemoryException*.

Требования

Header: afxdb.h

См. также

Основные понятия

CRecordset Class

CRecordset Members

Hierarchy Chart

CRecordset::SetFieldDirty

CRecordset::IsFieldNull