|
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
Step-by-Step
Instructions
Creating an Active Directory quick report
- Install Visual Basic and Active Directory.
- When asked for the project type, select Data Project.
- On Data Project, double-click Data
Environment1.
- On the Data Environment window,
right click on Connection
Object and select Properties.
- Select OLE DB Provider for Microsoft Directory
Services, and click Next button.
- Select Use NT Integrated Environment.
- On the Data Environment window again, right click to select
Add Command.
- 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='*'
Note: you should replace the domain
name with your own domain.

- Double-click Data Report1 from the Project
window.
- Drag and drop the Command1 object on
Data Environment to the Detail section in Data Report.
- On DataReport1 Properties, make
DataSource=DataEnvironment1 and DataMember=Command1.
- Right-click on Data Project, and select
DataProject
Properties.
- On the DataProject Properties Dialog - Startup
Object, select "Data Report1"
- Run, you should see the Report with data
obtained from Active Directory

|