Share via


CEDB Database Support (Windows Embedded CE 6.0)

1/6/2010

Windows Embedded CE supports databases stored anywhere on a device, including on PC cards and other installed file systems. The object store is considered a single, special database volume that is always mounted.

Each CEDB database contains a maximum of CEDB_MAXSORTORDER sort indexes and one or more records.

The maximum size of a record is defined in the CEDB_MAXRECORDSIZE constant in Windbase.h and in Rapi.h for Remote API (RAPI) calls.

A record can have a variable number of properties, but it cannot contain another record. The maximum size of a property is defined in the CEDB_MAXPROPDATASIZE constant, and Windows Embedded CE allocates space for a record or property only when necessary.

The following table shows the types of record properties.

Record property type Contains

CEVT_BOOL

Boolean value

CEVT_CEBLOB

Binary object

CEVT_R8

8-byte floating-point value

CEVT_FILETIME

Time and date data

CEVT_I2

2-byte signed integer

CEVT_I4

4-byte signed integer

CEVT_LPWSTR

Long pointer to a Unicode string

CEVT_UI2

2-byte unsigned integer

CEVT_UI4

4-byte unsigned integer

Note

The BOOL and floating-point properties are available only in Windows CE 2.10 and later.

Creating a record requires 20 bytes. A property requires 4 bytes.

In addition to records, a database contains a name and type identifier. The database name is a null-terminated string of up to 32 characters. The type identifier is application-specific and commonly used to identify similar databases.

Because Windows Embedded CE is designed to operate in a relatively volatile environment, the Windows Embedded CE database does not only automatically update when the database opens or closes. It updates after each individual transaction, such as a call to the CeWriteRecordProps (CEDB) function. A database volume is a file that contains all data for the databases in it. Individual database volumes can be up to 16 MB.

See Also

Concepts

Databases
Creating a Database
Deleting a Database Volume
Deleting Database Information
Enumerating Databases and Database Volumes
Modifying the Sort Order
Mounted Database Example
Mounting and Unmounting a Database Volume
Opening a Database
Reading a Record
Writing and Creating a Record
Adding a Database Volume on an External Device