OLE DB Programmer's Reference |
Creates a new row object from a row in a rowset and returns an interface pointer on the newly created row object.
HRESULT GetRowFromHROW( IUnknown **pUnkOuter, HROW hRow, REFIID riid, IUnknown **ppUnk); }
Parameters
Caution The consumer must ensure that hRow contains a valid row handle because the provider might not validate hRow before using it. The result of passing the handle of a deleted row is provider-specific, although the provider must not terminate abnormally. For example, the provider might return DB_E_BADROWHANDLE or DB_E_DELETEDROW, or it might get data from a different row. The result of passing an invalid row handle in hRow is undefined.
Return Code
Comments
IGetRow::GetRowFromHROW is a synchronous operation that instantiates a new row object. If multiple row objects have been created from the same row in a rowset, the visibility of changes made to one of these row objects as seen by the others is governed by properties of the source rowset. (For more information, see "Visibility of Changes" in Chapter 5: Updating Data in Rowsets.)
If a row is obtained from a source rowset using this method, the updatability of the row is inherited from the source rowset.
Providers that implement IGetRow::GetRowFromHROW are allowed to implement the row object on the same data structure that implements the source rowset, instead of on a separately cached data structure. In this case, the provider should increment the reference count of the row handle in the rowset when returning the corresponding row object with IGetRow::GetRowFromHROW. Consumers may then receive DB_E_ROWSNOTRELEASED on IRowset::GetNextRows, and must release the row object before obtaining additional rows.
1998-2001 Microsoft Corporation. All rights reserved.