IRowsetIdentity

IRowsetIdentity is the interface that indicates row instance identity is implemented on the rowset and enables testing for row identity. If a rowset supports this interface, any two row handles representing the same underlying row will always reflect the same data and state.

IRowsetIdentity depends on IRowset.

When to Implement

IRowsetIdentity is required for all providers that intend to support general consumers.

If the provider inherently supports row identity, this interface will be supported even if the command does not require it. For such providers, row identity is not disabled if the consumer does not request IRowsetIdentity.

If the DBPROP_LITERALIDENTITY property is set to VARIANT_TRUE, then the provider supports binary comparison of row handles.

This interface can be implemented even when row identity cannot be perfectly implemented; the rowset may reasonably take steps to be partially correct. For more information, see "Uniqueness of Rows in the Rowset" in Chapter 4.

When to Call

Consumers call IsSameRow whenever they need to determine if two row handles represent the same underlying row. For example, if a row handle is returned to the consumer during notification, the consumer can compare it to its own list of row handles to see if it is the handle of a row of interest.

Method Description
IsSameRow Compares two row handles to see if they refer to the same row instance.