Hi
I am trying to extract user data from Active Directory and locate it in an
offline Access database for reporting. The problem I have is when I came
acrsoss an object where an attribute is empty.
I tried to trap this with an isDBnull call (as below) but this does not
work - is it possible to identify null attributes in an Active Directory
SearchResult?
Ta PP
Dim ResEnt As SearchResultCol lection = mySearcher.Find All()
' Iterate through each SearchResult in the SearchResultCol lection.
Dim resEnt1 As SearchResult
For Each resEnt1 In ResEnt
If IsDBNull(resEnt 1.Properties("c ompany")) Then
valueCompany = NoValueString
Else
valueCompany = resEnt1.Propert ies("company"). ToString
'valueCompany = CStr(resEnt1.Pr operties("compa ny")(0))
End If
I am trying to extract user data from Active Directory and locate it in an
offline Access database for reporting. The problem I have is when I came
acrsoss an object where an attribute is empty.
I tried to trap this with an isDBnull call (as below) but this does not
work - is it possible to identify null attributes in an Active Directory
SearchResult?
Ta PP
Dim ResEnt As SearchResultCol lection = mySearcher.Find All()
' Iterate through each SearchResult in the SearchResultCol lection.
Dim resEnt1 As SearchResult
For Each resEnt1 In ResEnt
If IsDBNull(resEnt 1.Properties("c ompany")) Then
valueCompany = NoValueString
Else
valueCompany = resEnt1.Propert ies("company"). ToString
'valueCompany = CStr(resEnt1.Pr operties("compa ny")(0))
End If
Comment