K
Kenneth H. Young
I have developed an LDAP client application that I would like to add a treeview to that will display the schema for the People OU. I am testing with the following code to try to figure out but I'm not getting anywhere.:
Sub Main()
Dim myADSPath As String = "LDAP://servername:636/dc=ccs,dc=nrl,dc=navy,dc=mil"
' Creates an Instance of DirectoryEntry.
Dim myDirectoryEntry As New DirectoryEntry(myADSPath)
' Display the 'SchemaClassName'.
Console.WriteLine("Schema class name:" + myDirectoryEntry.Name())
Dim scn = myDirectoryEntry.SchemaClassName
' Gets the SchemaEntry of the ADS object.
Dim mySchemaEntry As DirectoryEntry = myDirectoryEntry.SchemaEntry
Dim myChildDirectoryEntry As DirectoryEntry
For Each myChildDirectoryEntry In myDirectoryEntry.Children
Console.WriteLine(myChildDirectoryEntry.Name)
Next myChildDirectoryEntry
End Sub
I get these Results:
Schema class name:dc=ccs
cn=Directory Administrators
ou=Groups
ou=Special Users
uid=kaskel
uid=ccsldap
ou=Accounts
uid=sborders
ou=People
ou=organization
Now what I would like for results for the People OU is the table field names: i.e.
uid
title
telephoneNumber
sn
site
roomNumber
givenName
cn
mail
etc...
This will aid in mapping the LDAP to the static database file.
Thank you for any assistance!
Sub Main()
Dim myADSPath As String = "LDAP://servername:636/dc=ccs,dc=nrl,dc=navy,dc=mil"
' Creates an Instance of DirectoryEntry.
Dim myDirectoryEntry As New DirectoryEntry(myADSPath)
' Display the 'SchemaClassName'.
Console.WriteLine("Schema class name:" + myDirectoryEntry.Name())
Dim scn = myDirectoryEntry.SchemaClassName
' Gets the SchemaEntry of the ADS object.
Dim mySchemaEntry As DirectoryEntry = myDirectoryEntry.SchemaEntry
Dim myChildDirectoryEntry As DirectoryEntry
For Each myChildDirectoryEntry In myDirectoryEntry.Children
Console.WriteLine(myChildDirectoryEntry.Name)
Next myChildDirectoryEntry
End Sub
I get these Results:
Schema class name:dc=ccs
cn=Directory Administrators
ou=Groups
ou=Special Users
uid=kaskel
uid=ccsldap
ou=Accounts
uid=sborders
ou=People
ou=organization
Now what I would like for results for the People OU is the table field names: i.e.
uid
title
telephoneNumber
sn
site
roomNumber
givenName
cn
etc...
This will aid in mapping the LDAP to the static database file.
Thank you for any assistance!