OLE DB Programmer's Reference |
Returns the child rowset corresponding to a chapter-valued column in the parent rowset.
HRESULT GetChildRowset( IUnknown *pUnkOuter, DBORDINAL iOrdinal, REFIID riid, IUnknown **ppRowset);
Parameters
Return Code
pUnkOuter was not a null pointer, and riid was not IID_IUnknown.
The provider is single-chaptered, and a child rowset is still open.
Comments
IParentRowset::GetChildRowset can be called only once for each child rowset and if called, must be called before any calls to IRowsetInfo::GetReferencedRowset for that child. The pUnkOuter argument specified in IParentRowset::GetChildRowset defines the controlling unknown for all references to that child rowset for the lifetime of the parent. The parent rowset must use addref on this controlling unknown to guarantee that it doesn t go away before the parent. Even though the controlling unknown is constant for the lifetime of the parent, the consumer must not assume that rowset states, such as accessors, row position, and so on, are held when all references to the rowset are released. Furthermore, providers must ensure that the next fetch position within the child rowset is reset once all references to that child rowset have been released. Calling IParentRowset::GetChildRowset for a child rowset that has already been obtained returns DB_E_OBJECTOPEN.
IRowsetInfo::GetReferencedRowset
1998-2001 Microsoft Corporation. All rights reserved.