| description | Learn more about: CEnumerator Class | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| title | CEnumerator Class | ||||||||||||||
| ms.date | 11/04/2016 | ||||||||||||||
| f1_keywords |
|
||||||||||||||
| helpviewer_keywords |
|
||||||||||||||
| ms.assetid | 25805f1b-26e3-402f-af83-1b5fe5ddebf7 |
Uses an OLE DB enumerator object, which exposes the ISourcesRowset interface to return a rowset describing all data sources and enumerators.
class CEnumerator :
public CAccessorRowset< CAccessor <CEnumeratorAccessor >>Header: atldbcli.h
| Name | Description |
|---|---|
| Find | Searches through available providers (data sources) looking for one with the specified name. |
| GetMoniker | Retrieves the IMoniker interface for the current record. |
| Open | Opens the enumerator. |
You can retrieve the ISourcesRowset data indirectly from this class.
Looks for a specified name among available providers.
bool Find(TCHAR* szSearchName) throw();szSearchName
[in] The name to search for.
true if the name was found. Otherwise, false.
This name maps to the SOURCES_NAME member of the ISourcesRowset interface.
Parses the display name to extract the component of the string that can be converted into a moniker.
HRESULT GetMoniker(LPMONIKER* ppMoniker) const throw();
HRESULT GetMoniker(LPMONIKER* ppMoniker,
LPCTSTR lpszDisplayName) const throw();ppMoniker
[out] The moniker parsed from the display name (CEnumeratorAccessor::m_szParseName) of the current row.
lpszDisplayName
[in] The display name to parse.
A standard HRESULT.
Binds the moniker for the enumerator, if one is specified, then retrieves the rowset for the enumerator by calling ISourcesRowset::GetSourcesRowset.
HRESULT Open(LPMONIKER pMoniker) throw();
HRESULT Open(const CLSID* pClsid = & CLSID_OLEDB_ENUMERATOR) throw();
HRESULT Open(const CEnumerator& enumerator) throw();pMoniker
[in] A pointer to a moniker for an enumerator.
pClsid
[in] A pointer to the CLSID of an enumerator.
enumerator
[in] A reference to an enumerator.
A standard HRESULT.
DBViewer
OLE DB Consumer Templates
OLE DB Consumer Templates Reference