CEDB Database Support (Windows CE 5.0)
Windows 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 indices 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 application programming interface (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 CE allocates space for a record or property only when necessary.
The following table shows the different types of available 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.
The overhead associated with creating a record is 20 bytes per record; the overhead for a property is 4 bytes per property.
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 CE is designed to operate in a relatively volatile environment, the Windows CE database does not only automatically update when the database opens or closes. It also updates after each individual transaction, such as a call to the CeWriteRecordProps (CEDB) function. A database volume is a file that contains all of the data that is necessary for the databases inside it. Individual database volumes can be up to 16 MB.
See Also
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
Send Feedback on this topic to the authors