Share via


IRowsetInfo::GetReferencedRowset

Returns an interface pointer to the rowset to which a bookmark or chapter applies.

Syntax

HRESULT GetReferencedRowset (
   DBORDINAL     iOrdinal,
   REFIID        riid,
   IUnknown    **ppReferencedRowset);

Parameters

  • iOrdinal
    [in] The bookmark or chapter column for which to get the related rowset.

  • riid
    [in] The IID of the interface pointer to return in *ppReferencedRowset. This interface is conceptually added to the list of required interfaces on the resulting rowset, and the method fails (E_NOINTERFACE) if that interface cannot be supported on the resulting rowset.

  • ppReferencedRowset
    [out] A pointer to memory in which to return an IUnknown interface pointer on the rowset that interprets values from this column. If this is not a reference column, *ppReferencedRowset is set to a null pointer.

Return Code

  • S_OK
    The method succeeded.

  • E_FAIL
    A provider-specific error occurred.

  • E_INVALIDARG
    ppReferencedRowset was a null pointer.

  • E_NOINTERFACE
    The interface specified in riid was not implicitly or explicitly specified as a rowset property of the rowset. The current rowset remains valid.

  • E_UNEXPECTED
    ITransaction::Commit or ITransaction::Abort was called, and the object is in a zombie state.

  • DB_E_BADORDINAL
    The column specified by iOrdinal did not exist.

  • DB_E_NOTAREFERENCECOLUMN
    The column specified by iOrdinal did not contain bookmarks or chapter values.

  • DB_E_NOTREENTRANT
    The provider called a method from IRowsetNotify in the consumer that had not yet returned, and the provider does not support reentrancy in this method.

  • DB_E_NOTSUPPORTED
    The interface was exposed on an index rowset.

Comments

This method makes no logical change to the state of the current rowset.

All of the bookmarks or chapter values in a column reference a single rowset. The references can apply to the current rowset (an example would be genealogy relations on a People table), or they can apply to a different rowset (an example of which would be Customer Orders).

For more information, see Bookmarks or Chapters.

See Also

Reference

IChapteredRowset

IColumnsInfo

IColumnsRowset