MDAC 2.5 SDK - OLE DB Providers
OLE DB Persistence Provider
To persist the rowset, the OLE DB Persistence Provider combines the metadata and the data. The stored metadata varies slightly when saving a rowset in XML or ADTG format. Though ADTG is proprietary, XML is not.
Information about the rowset is persisted, including column count, visible column count, and base table count. The OLE DB property set GUID is persisted once with a count of the properties stored for that set. Each property ID, the length of the data, and the data itself are persisted. Rowset properties are stored in this manner for version compatibility. Properties appearing in the stream that are unknown to the rowset reading the stream are ignored.
Information about the state of each row is also stored. This "presence map" tracks the state and stores a bit for each nullable field in the row. The bit describes whether or not any data exists for that column. Fixed-length data is stored as-is, and variable-length data is stored preceded by a length.
Base table and column information is persisted. The base table information includes the key columns defined, which the client Cursor Service uses during updates. The column information includes the base column name and the friendly name (or alias), the type, length, scale, precision, and OLE DB column flags. If available, the base table name, the base catalog name, and the base schema name are also included.
Note When the column name has not been assigned an alias, its name is identical to its base column name, so it appears twice.
A row can be in one of the four states described in the following table, depending on the action (or inaction) taken.
Row state | Description |
Unchanged | The data is stored in its original form. |
Deleted | For ADTG formatted rowsets, the original data is stored, and a token follows it, marking the row as one that should be deleted.
XML formatted rowsets have no need of this row state. |
Inserted | A token marks the row as a new row, and the new data is stored as-is. |
Changed | The original data is stored, and the modified columns are stored. An internal presence map determines which columns are modified. |