virtual bool CRBase::OpenRBase(IUnknown *pIUnknownToRowset);

Return Value

        true if successful; otherwise false.

Parameters

        [in] pIUnknownToRowset:

                A pointer to an interface wired with a rowset.

Remark

       Opens a CRBase object with an interface to a rowset, and automatically sets all of its associated interfaces, data structures, accessors and members. Here is the example to open an enumerator for retrieving all the OLEDB providers installed into a machine.

CLSID idEnumerator=CLSID_OLEDB_ENUMERATOR;
CRBase                                     enumRowset;
CComPtr<ISourcesRowset>      pISourcesRowset;
CComPtr<IAccessor>               pIAccessor;
CoCreateInstance(idEnumerator, NULL, CLSCTX_INPROC_SERVER, IID_ISourcesRowset, (LPVOID*)&pISourcesRowset);
pISourcesRowset->GetSourcesRowset(NULL, IID_IAccessor, 0, NULL, (IUnknown**)&pIAccessor);
enumRowset.OpenRBase(pIAccessor.p);

//process the rowset

CRBase Class Overview & Class Members