CCeDBDatabase::SetSortProps

This member function sets the new sort order of the database.

Syntax

BOOL SetSortProps( int nSize, const CCeDBProp *pSortProps );

At a Glance

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

Parameters

nSize
The number of sort properties in pSortProps. This number cannot be greater than CEDB_MAXSORTORDER.
pSortProps
An array of sort properties to assign to the database. There should be nSize sort properties in the array. Construct the sort properties using the sort property constructor, CCeDBProp::CCeDBProp(CCeDBProp::enType nType,WORD wIdent, WORD wSortFlags).

Return Values

TRUE if the last modified date and time were successfully set. FALSE if there was an error. Call ::GetLastError to determine why the operation failed.

Remarks

The pSortProps parameter cannot contain more than CEDB_MAXSORTORDER sort properties. In Windows CE 2.0, this number is four.

You cannot have two sort properties in the same database with the same application-defined identifier.

The sort property you pass in the pKeyProp parameter of the Open member function must be one of the properties you previously specified in a call to either SetSortProps or Create.

See Also

CCeDBDatabase Overview, CCeDBDatabase Member Functions, Windows CE Database Classes, CCeDBDatabase::Create, CCeDBDatabase::GetSortProps, CCeDBDatabase::Open, CCeDBProp::CCeDBProp, ::GetLastError