Partager via


SORTORDERSPECEX (EDB)

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This structure contains information about a sort order in a database. The structure is used when calling the CeOpenDatabaseInSession (EDB) function and is also included in the CEDBASEINFOEX (EDB) structure.

Syntax

typedef struct CESORTORDERSPECEX {
  WORD wVersion;
  WORD wNumProps;
  WORD wKeyFlags;
  WORD wReserved;
  CEPROPID rgPropID[CEDB_MAXSORTPROP];
  DWORD rgdwFlags[CEDB_MAXSORTPROP];
} CESORTORDERSPECEX;

Members

  • wVersion
    Version of this structure. Must be set to 2.
  • wNumProps
    Number of properties in this sort order, which must not be more than SQLCE_MAXSORTPROP (16).
  • wKeyFlags
    One or a combination of additional constraints to the sort order. The following table shows possible values.

    Flag Description

    CEDB_SORT_NO_POSITIONAL

    Specifies that positional access is not allowed.

    CEDB_SORT_PRIMARYKEY

    Specifies a unique sort order. Only one can be created per database.

    CEDB_SORT_UNIQUE

    Requires the key to be unique across all records in the database.

    Zero

    Adds no additional constraints to the sort order.

  • wReserved
    Reserved; do not use.
  • rgPropID
    Array of properties on which to sort. Sorting occurs in the order in which the properties are specified in the array.
  • rgdwFlags
    Sort flags that correspond to the properties in rgPropID. To sort differently, specify one or a combination of the following flags:

    • CEDB_SORT_CASEINSENSITIVE
    • CEDB_SORT_DESCENDING
    • CEDB_SORT_IGNOREKANATYPE
    • CEDB_SORT_IGNORENONSPACE
    • CEDB_SORT_IGNORESYMBOLS
    • CEDB_SORT_IGNOREWIDTH
    • CEDB_SORT_NONNULL
    • CEDB_SORT_UNKNOWNFIRST

Remarks

The default sort is ASCENDING, CASE_SENSITIVE.

The following are the differences between this structure and the CEDB equivalent:

  • In EDB, the following new flags are available for setting features of the sort order:
    • CEDB_SORT_NO_POSITIONAL
    • CEDB_SORT_PRIMARYKEY
  • If a sort order is constrained to be unique, EDB allows a single NULL to occur, but in CEDB, no NULLs are permitted. For example, if there are two properties in a sort order, then EDB considers "A,B", "A,NULL", "NULL,B", and "NULL,NULL" unique.

Requirements

Header windbase.h
Library coredll.lib
Windows Embedded CE Windows CE 5.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

EDB Structures
CeOpenDatabaseInSession (EDB)
CEDBASEINFOEX (EDB)