Active Directory Service Interfaces - Data Link

Data Link is an exciting technology included in the Visual Studio and Office 2000. It allows you to build ADO Connections and Commands interactively. Using this technology and ADSI, you will be able to build a quick form or report interacting with Active Directory

Requirements

- Visual Basic® 6.0 or higher (http://msdn.microsoft.com/vbasic)
- Windows® 2000 Active Directory™ (http://www.microsoft.com/windows)
- ADSI (http://www.microsoft.com/adsi)

Step-by-Step Instructions

Creating an Active Directory quick report

1. Install Visual Basic and Active Directory.
2. When asked for the project type, select Data Project.
3. On Data Project, double-click Data Environment1.
4. On the Data Environment window, right click on Connection Object and select Properties.
5. Select OLE DB Provider for Microsoft Directory Services, and click Next button.
6. Select Use NT Integrated Environment.
7. On the Data Environment window again, right click to select Add Command.
8. Check the SQL Statement, and type the following (see figure below as an example):
   SELECT Name from 'LDAP://DC=windows2000,DC=nttest,DC=microsoft,DC=com'
   WHERE objectClass='user' AND objectCategory='Person'
   Note: you should replace the domain name with your own domain.
9. Double-click Data Report1 from the Project window.
10. Drag and drop the Command1 object on Data Environment to the Detail section in Data Report.
11. On DataReport1 Properties, make DataSource=DataEnvironment1 and DataMember=Command1.
12. Right-click on Data Project, and select DataProject Properties.
13. On the DataProject Properties Dialog - Startup Object, select "Data Report1"
14. Run, you should see the Report with data obtained from Active Directory