![]() |
|
|
Published: Tuesday, April 18, 2000 By Julian In order to do an ADO query against an LDAP database using Active Directory, you must install the latest version of ADSI (I believe it's currently v2.5). If you are running Windows 2000, Active Directory is already built in. To learn more about LDAP, Acitve Directory, and ADSI, check out these resources: In our example the query is run against a Site Server LDAP database to get a listing of the users. The SQL statement consistes of:
The first thing you will notice that's different, is that the table source becomes the
LDAP server, port and node you wish to query. The field name
In the next part of the code we instantiate an ADO Connection object, and set it's
provider to:
Since I have setup my Site Server LDAP database to disallow Anonymous acces, I am going to do an authenticated bind. Doing an authenticated bind to an LDAP Server requires that the user you are binding to has Administrative rights. The Administrator password must also be supplied.
Once the connection has been suceesfully opened, the SQL Statement is executed creating an ADO recordset.
And if all goes well, we should be able to iterate the ADO recordset. The
Try querying your LDAP Schema. Have fun! Happy Programming!
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||