Поделиться через


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 an optional interface on the rowset object. However, general consumers expect the rowset object to implement this interface, either natively or via OLE DB Services.

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, 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.

When to Call

Consumers call IRowsetIdentity::IsSameRow whenever they need to determine whether 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 whether it is the handle of a row of interest.

Method

Description

IsSameRow

Compares two row handles to see whether they refer to the same row instance.

This topic is a part of: