Share via


SORTORDERSPECEX (EDB) (Compact 7)

3/12/2014

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

Syntax

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

Members

  • wVersion
    Indicates the 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.

    0 (zero)

    Adds no additional constraints to the sort order.

  • wReserved
    Reserved.
  • 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

This structure is used when calling the CeOpenDatabaseInSession (EDB) function and is also included in the CEDBASEINFOEX (EDB) structure.

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

See Also

Reference

EDB Structures
CeOpenDatabaseInSession (EDB)
CEDBASEINFOEX (EDB)