Share via


Persisted Rowset Data and Information

To persist the rowset, the OLE DB Persistence Provider combines the metadata and the data. The stored metadata varies when saving a rowset in XML or ADTG format. Although ADTG is proprietary, XML is not.

XML-formatted streams, when in a persisted state, do not contain any values for rowset properties.

ADTG-formatted rowsets store information about the persisted data, including column count, visible column count, and base table count. Base table and column information is persisted. The base table information includes the key columns defined, which the client cursor engine 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

Because the column name is identical to its base column name, it appears twice.

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 the length.

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.

Not applicable to XML-formatted rowsets.

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.

This topic is a part of:

See Also

Reference

Getting Information About Properties

Property Structures and Enumerated Types

Visibility of Changes

Concepts

Persisted Rowset Data and Information Properties, Methods, and Events