共用方式為


Uniqueness of Rows in the Rowset

If a row is fetched more than once without any intervening calls to release it, the DBPROP_LITERALIDENTITY property determines whether the rowset contains one or multiple copies of the row.

Providers that can detect whether a newly fetched row is already represented by a currently held row handle should simply return the existing row handle with an incremented reference count. For such providers, the DBPROP_LITERALIDENTITY property is set to VARIANT_TRUE.

If DBPROP_LITERALIDENTITY is set to VARIANT_FALSE, multiple different concurrently held row handles can represent the same row in the underlying data store. To the rowset, these generally appear as separate rows. Therefore, changes made through one row handle are not reflected when reading the row through a second row handle. Calling IRowsetRefresh::RefreshVisibleData, IRowsetUpdate::Undo, or IRowsetUpdate::Update affects only changes made through the specified row handle.

The consumer can call IRowsetIdentity::IsSameRow to determine whether two row handles represent the same row. Such comparisons are necessary, for example, when the consumer receives a row handle through one of the methods in IRowsetNotify and needs to know if it is the handle of a row that the consumer already holds. Whether the handles of newly inserted rows ? that is, rows inserted during the lifetime of the rowset ? can be compared at all depends on the value of the DBPROP_STRONGIDENTITY property.