Query Interfaces
There are three types of ADSI interfaces used to perform directory searches. The application environment and other requirements may dictate which interface you use.
- IDirectorySearch. IDirectorySearch is a fairly simple COM interface available to C/C++ programmers only.
- ADO. The ActiveX Data Object interfaces are OLE Automation interfaces that utilize OLE DB. ADO should be used for queries within applications that rely on OLE Automation. This includes Visual Basic applications, Active Server Pages, and so on.
- OLE DB. OLE DB is a set of C/C++ interfaces for querying databases. By supporting these interfaces, ADSI providers can participate in advanced OLE DB functionality, such as distributed queries with other OLE DB providers.
All interfaces allow setting the following search preferences:
- Asynchronous operation
- Time limit for a search
- Whether the server should return the names of attributes that are empty
- Base, One Level, or Sub-Tree depth to the search
- Size limit for a result set
- Time limit for the server to process a result set
- Page size for the result set
- Timeout for generating a page in a result set
- Whether or not to chase referrals
- Whether or not to sort the result set