IRowsetIdentity::IsSameRow

OLE DB Programmer's Reference

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

HRESULT IsSameRow (    HROW   hThisRow,    HROW   hThatRow);

Parameters

hThisRow
[in]
The handle of an active row.
hThatRow
[in]
The handle of an active row.

Return Code

S_FALSE
The method succeeded, and the row handles do not refer to the same row instance.
S_OK
The method succeeded, and the row handles do refer to the same row instance.
E_FAIL
A provider-specific error occurred.
E_UNEXPECTED
ITransaction::Commit or ITransaction::Abort was called, and the object is in a zombie state.
DB_E_BADROWHANDLE
hRowThis or hRowThat was invalid.
DB_E_DELETEDROW
hRowThis or hRowThat referred to a row for which a deletion had been transmitted to the data store.
DB_E_NEWLYINSERTED
The provider is unable to determine identity for a row for which an insertion had been transmitted to the data store. This condition can occur when DBPROP_STRONGIDENTITY is set to VARIANT_FALSE.

Comments

This method makes no logical change to the state of the object.

The row handles refer to the same row instance if the value set in any column in the row by means of one row handle will be the value returned for that column when gotten through the other row handle.

Rowsets that support this interface must also implement the detection of row identity within their rowset. That is, if they fetch rows at different times, they can detect when the row handles are referring to the same logical row and arrange for both row handles to reflect the same data and state.

The value of the row handles—their bit patterns as handles—is not necessarily the same if the underlying row is the same. This depends on the value of the DBPROP_LITERALIDENTITY property.

The outcome of IRowsetIdentity::IsSameRow is not changed when one or both of its parameters correspond to a row with a pending delete.

1998-2001 Microsoft Corporation. All rights reserved.



Microsoft Ole Db 2.0 Programmer's Reference and Data Access SDK
Microsoft OLE DB 2.0 Programmers Reference and Data Access SDK (Microsoft Professional Editions)
ISBN: 0735605904
EAN: 2147483647
Year: 1998
Pages: 1083

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net