Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
Databases provides storage, access, and sorting of property-set records. The Windows CE database model is that of a small, flat structure, optimized for small, efficient storage. As such, the Windows CE database APIs do not correspond to the Win32 database APIs. Data operations are transactioned, which protects against data loss. If a Windows CE–based device loses power (reset or suspend/resume, where the RAM is refreshed) during a data transaction, Windows CE reverts all partial database operations to the last known good state.
Prior to Windows CE 2.10, a Windows CE database could exist only in the object store. Effective with version 2.10 Windows CE supports databases anywhere on the device, including PC Cards and other installed file systems. Conceptually, the object store is a single, special database volume that is always mounted.
The database model . Each Windows CE 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 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, Windows CE allocates space for a record or property only when necessary. Effective in version 3.0, a new constant CEDB_MAXNUMRECORDS of 65,535 has been added to indicate the maximum number of records that can be added to a database. Before version 3.0, the maximum the record limit was implicitly imposed by the maximum number of objects that could be placed in the object store. 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 |