Searching Active Directory

When you need to find an object within an Active Directory tree, and you don't want to traverse through the entire tree until you find the object, you can use ADO to perform SQL-like queries to find the object. This requires a strange combination of SQL syntax, and the LDAP paths, to define the search criteria and search scope, but the result is a standard ADO recordset.

LDAP Scope Syntax

First, when you are using ADO to search an Active Directory tree, you use the LDAP path in the place of the database table to define the scope of where you are searching from. This is much like specifying a specific directory from which you want to perform a search for a file. The directory you specify is the starting point, ...

Get Developing Secure Applications with Visual Basic now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.