Querying a Directory Service

Because many queries to a directory service behave like database queries and return tables of information, ADSI supports interfaces that allow you to define queries.

For both Automation clients using ActiveX Data Objects (ADO) and all non-Automation clients, ADSI supplies an OLE DB provider, supporting a subset of OLE DB query interfaces. Client code that already uses OLE DB interfaces for queries can use the same interfaces to query directory services.

For non-Automation clients, ADSI providers can support the IDirectorySearch interface on any ADSI object. This interface is a simpler implementation of the same OLE DB functionality. For information on whether or not this interface is supported by a system provider, see ADSI System Providers.

For more information, see Using Directory Service Queries.