Freigeben über


Enumerator Objects

In the Rowset Programming and Object Model, the enumerator programming task is represented by the enumerator object. The enumerator is an OLE DB object that searches for available data source objects and other enumerators. Consumers that are not customized for a particular provider can use enumerators to search for an appropriate data source object to use.

Note

Although the enumerator object comes first in this model, other means of obtaining a data source object are used more often.

An enumerator object exposes the ISourcesRowset interface, which returns a rowset describing all data source objects and enumerators that are known to the enumerator. Another type of enumerator object, the root enumerator, traverses the registry looking for data source objects and other enumerators. For more information about the root enumerator object, see Root Enumerator Object. Other enumerators traverse the registry or search in a provider-specific manner. For example, an enumerator over the file system might search for subdirectories.