SORTORDERSPEC (CEDB) (Windows Embedded CE 6.0)

1/6/2010

This structure contains information about a sort order in a database.

Syntax

typedef struct _SORTORDERSPEC {
  CEPROPID propid;
  DWORD dwFlags;
} SORTORDERSPEC; 

Members

  • propid
    Identifier of the property to be sorted on. Sorts on binary properties are not allowed. See the description of a propid inside the CEPROPVAL (CEDB) structure.
  • dwFlags
    Sort flags. To get the default sort, specify zero. The default is ascending order and case-sensitive. Records that do not contain the sort property are placed after all other records.

    The following table shows flags that can be used alone or in combination to specify different kinds of sort operations.

    Value Description

    CEDB_SORT_CASEINSENSITIVE

    Causes thee sort operation to be case-insensitive. This value is valid only for strings.

    CEDB_SORT_DESCENDING

    Causes the sort to be in descending order. By default, the sort is done in ascending order.

    CEDB_SORT_IGNOREKANATYPE

    The sort does not differentiate between hiragana and katakana characters. This value is valid only for strings.

    CEDB_SORT_IGNORENONSPACE

    Specifies that this sort ignores nonspacing characters, such as accents, diacritics, and vowel marks. This value is valid only for strings.

    CEDB_SORT_IGNORESYMBOLS

    Causes the sort operation to not recognize symbol values. This value is valid only for strings.

    CEDB_SORT_IGNOREWIDTH

    Prevents the sort operation from differentiating between a single-byte character and the same character as a double-byte character. This value is valid only for strings.

    CEDB_SORT_NONNULL

    Requires the sort property to be present in all records.

    CEDB_SORT_UNIQUE

    Requires the key to be unique across all records in the database. This constraint also requires the sort property to be present in all records.

    CEDB_SORT_UNKNOWNFIRST

    Causes the sort operation to place records that do not contain the sort property before all the other records.

Remarks

This structure supports only simple sorts on a key. Records with the same key value are sorted in arbitrary value. Use the SORTORDERSPECEX (CEDB) structure to define more complex sorts on multiple properties.

The CEDB_SORT_UNIQUE flag implies the CEDB_SORT_NONNULL flag, meaning that when uniqueness is required, all records must include the sort property. It is not necessary to specify both the CEDB_SORT_UNIQUE flag and the CEDB_SORT_NONNULL flag.

Requirements

Header windbase.h
Windows Embedded CE Windows CE 1.0 and later

See Also

Reference

CEDB Structures
CeCreateDatabase (CEDB)
CEDBASEINFO (CEDB)
SORTORDERSPECEX (CEDB)
CEPROPVAL (CEDB)