CCeDBDatabase::DeleteCurrRecordProps

This member function deletes a subset of the properties of the current record in the database.

Syntax

BOOL DeleteCurrRecordProps( int nNumProps = 0,CCeDBProp *pPropArray = NULL );

At a Glance

Header file: Wcedb.h
Platforms:
Versions: 2.0 and later

Parameters

nNumProps
The number of properties in pPropArray. If this parameter is set to zero, the entire record will be deleted.
pPropArray
An array of valueless properties whose application-defined identifiers specify which properties to delete from the current database record. Construct the valueless properties by using the sort property constructor CCeDBProp::CCeDBProp(CCeDBProp::enType nType,WORD wIdent, WORD wSortFlags). (Sort flags are ignored.) If you pass in a null pointer, the entire record will be deleted from the database.

Return Values

TRUE if the properties were successfully deleted. FALSE if there was an error. Call ::GetLastError to determine why the operation failed.

Remarks

If you do not pass any parameters, this function behaves exactly like DeleteCurrRecord.

In a Windows CE object store database, you can delete a property on which a sort order has been defined without any adverse effects. By default, records that do not contain the sort property currently in effect are placed last in the sort order. If the sort property was defined in CCeDBDatabase::Create or CCeDBDatabase::SetSortProps with the flag Sort_UnknownFirst, they are placed first.

Whenever you alter a record, the records are resorted so they'll be in the proper order for next seek operation.

If m_bAutoSeekNext is set to TRUE, the current record will be the next record in the sort order, rather than the record just read.

See Also

CCeDBDatabase Overview, CCeDBDatabase Member Functions, Windows CE Database Classes, CCeDBDatabase::DeleteCurrRecord, CCeDBProp::CCeDBProp, ::GetLastError