Article ID: 159956
Article Last Modified on 11/21/2006
// m_pSet is a pointer to a CRecordset derived class, called CMySet,
// that has a text member variable called m_Name.
m_pSet->Edit();
m_pSet->m_Name = "NewName";
m_pSet->Update();
m_pSet->Edit();
if( m_pSet->IsFieldDirty( &(m_pSet->m_Name) ) )
TRACE( "Name is dirty\n" );
// The next call will update the record, even though the data has
// not changed.
m_pSet->Update();
// Override CRecordset::Update and clear the dirty flags:
BOOL CMySet::Update()
{
BOOL bReturn = CRecordset::Update();
if (m_bCheckCacheForDirtyFields &&
!(m_dwOptions & optimizeBulkAdd))
{
SetFieldDirty(NULL, FALSE);
}
return bReturn;
}
Additional query words: kbVC420bug kbDSupport
Keywords: kbbug kbfix kbdatabase kbvc500fix KB159956