Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
juicyapple
Posting Yak Master
176 Posts |
Posted - 2008-03-23 : 09:16:32
|
Hi, I wrote a sub procedure to list out all users in few directory entry. But the code is something wrong because I get unknown error for second loop of For Each deUser In deAllUser.Children. Please advise.Public Sub ListAllUser()Dim i As IntegerDim deAllUser As DirectoryEntryDim deUser As DirectoryEntryTryDim objLDAP() As Object = ConfigurationManager.AppSettings("LDAP").Split("^")For i = 0 To objLDAP.Length - 1 deAllUser = New DirectoryEntry(objLDAP(i).ToString) For Each deUser In deAllUser.Children lstMember.Items.Add(New ListItem(deUser.Properties("FullName").Value, deUser.Name)) NextNextCatch ex As ExceptionResponse.Write(ex.ToString)End TryEnd Sub |
|
|
|
|