Platform SDK: CDO for Windows 2000

IsDirty Property

The IsDirty property specifies whether the local data has been altered since the last time it was saved to the currently bound data source.

[Visual Basic,VBScript]
Property IsDirty as Boolean
[C++]
HRESULT get_IsDirty(VARIANT_BOOL* pVal);
HRESULT put_IsDirty(VARIANT_BOOL Val);
[IDL]
HRESULT [propget] IsDirty([out,retval] VARIANT_BOOL* pVal);
HRESULT [propput] IsDirty([in] VARIANT_BOOL Val);

Remarks

After you bind to a data source object, two copies of the data exist: the local data, and the data in the data source object. When changes are made to the local copy of the data, this flag switches to True (VARIANT_TRUE), which indicates that the local copy is dirty when it is compared to the data in the data source. The IsDirty flag is reset to False (VARIANT_FALSE) whenever the local data is saved back into the bound object using IDataSource.Save. The flag is also reset whenever the object is re-bound using the methods IDataSource.OpenObject and IDataSource.SaveToObject.

The IsDirty property does not reflect whether changes have subsequently occurred to the data in a bound data source after it was bound.

See Also

IDataSource.Save Method

IDataSource.OpenObject Method

IDataSource.SaveToObject Method