CCeDBDatabase::DeleteCurrRecordProps

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

At a Glance

Header file: Wcedb.h
Platforms: H/PC 2.0, Palm-size PC, H/PC Pro
Windows CE versions: 2.0 and later

Syntax

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

Parameters

nNumProps
Number of properties in pPropArray. If this parameter is set to zero, the entire record will be deleted.
pPropArray
Pointer to 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 following 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 indicates that the properties were successfully deleted. FALSE indicates that there was an error. To get extended error information, call GetLastError.

Remarks

If you do not pass any parameters, this method 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 Sort_UnknownFirst flag, they are placed first.

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

If the m_bAutoSeekNext data member 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::DeleteCurrRecord, CCeDBProp::CCeDBProp, GetLastError