CEDBASEINFOEX (CEDB) (Windows Embedded CE 6.0)

1/6/2010

This structure contains information about a database object. This structure is used by the CeSetDatabaseInfoEx2 (CEDB) and the CeCreateDatabaseEx2 (CEDB) functions.

Syntax

typedef struct CEDBASEINFOEX {
  WORD wVersion;
  WORD wNumSortOrder;
  DWORD dwFlags;
  WCHAR szDbaseName[CEDB_MAXDBASENAMELEN]; 
  DWORD dwDbaseType;
  DWORD dwNumRecords;
  DWORD dwSize;
  FILETIME ftLastModified; 
  SORTORDERSPECEX rgSortSpecs[CEDB_MAXSORTORDER];
} CEDBASEINFOEX;

Members

  • wVersion
    Version of this structure. Applications must set wVersion to 1.
  • wNumSortOrder
    Number of sort orders active in the database. Up to four sort orders can be active at a time.
  • dwFlags
    This member can be set to one or a combination of values. The following table shows possible values.

    Flag Description

    CEDB_VALIDDBFLAGS

    Indicates whether the CEDB_NOCOMPRESS and CEDB_SYSTEMDB extended flags are being changed.

    CEDB_VALIDMODTIME

    Indicates that the ftLastModified member is valid and should be used.

    CEDB_VALIDNAME

    Indicates that the szDbaseName member is valid and should be used.

    CEDB_VALIDSORTSPEC

    Indicates that the rgSortSpecs member is valid and should be used.

    CEDB_VALIDTYPE

    Indicates that the dwDbaseType member is valid and should be used.

    The following table shows possible extended flag values.

    Extended flag Description

    CEDB_NOCOMPRESS

    Indicates that the database is not compressed. If this flag is used with CeSetDatabaseInfoEx2, new or modified records in a compressed database are uncompressed. If this flag is used with CeCreateDatabaseEx2, the database is not compressed.

    By default, all databases are compressed. If you are going to change the compression, do this at creation time.

    CEDB_SYSTEMDB

    Indicates that the database is marked as a system database and cannot be deleted by an unprivileged application. For more information on privileged applications and database security, see Database Security.

  • szDbaseName
    Null-terminated string that contains the name of the database. The string can have up to 32 characters, including the terminating null character. This member must be set when used for CeCreateDatabaseEx2.
  • dwDbaseType
    Type identifier for the database.
  • dwNumRecords
    Number of records in the database.
  • dwSize
    Size of the database, in bytes.
  • ftLastModified
    Last time this database was modified.
  • rgSortSpecs
    Array containing the sort order descriptions. Only the first n array members are valid, where n is the value specified by the wNumSortOrder member. If no sort orders are specified for CeCreateDatabaseEx2 or when CEDB_VALIDSORTSPEC is not specified, a default sort order is assigned to the database.

Remarks

CeSetDatabaseInfoEx2 and the CeOidGetInfoEx2 (CEDB) functioncan use all of the dwFlags flags. CeCreateDatabaseEx2 makes use of only the CEDB_VALIDDBFLAGS, CEDB_NOCOMPRESS, and CEDB_SYSTEMDB flags. Using other flags with CeCreateDatabaseEx2 is ignored.

If you attempt to change the information for an existing database using the CeSetDatabaseInfoEx2 (CEDB) function and pass the CEDB_VALIDNAME flag in dwFlags, you receive an error stating that there is an existing database with that name. If you do not want to change the database name, do not set the CEDB_VALIDNAME flag. Only the flags for the parameters that are changing should be set. For parameters that are not changing, do not set the corresponding CEDB_VALID* flag.

Requirements

Header windbase.h
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

CEDB Structures
CeCreateDatabaseEx2 (CEDB)
CeSetDatabaseInfoEx2 (CEDB)
CeSetDatabaseInfoEx2 (CEDB)
CEOIDINFOEX (CEDB)
CeOidGetInfoEx2 (CEDB)
CeGetDBInformationByHandle (CEDB)
SORTORDERSPECEX (CEDB)

Other Resources

Database Security