Uniqueness of Rows in the Rowset

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

Providers that can reasonably detect whether a newly fetched row is already represented by a currently held row handle are strongly encouraged to 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 may represent the same row in the data source. To the rowset, these generally appear as separate rows. Thus, changes made through one row handle are not reflected when reading the row through a second row handle, and calling RefreshVisibleData, Undo, or Update only affects 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.