P
Pete Piper
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 SearchResultCollection = mySearcher.FindAll()
' Iterate through each SearchResult in the SearchResultCollection.
Dim resEnt1 As SearchResult
For Each resEnt1 In ResEnt
If IsDBNull(resEnt1.Properties("company")) Then
valueCompany = NoValueString
Else
valueCompany = resEnt1.Properties("company").ToString
'valueCompany = CStr(resEnt1.Properties("company")(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 SearchResultCollection = mySearcher.FindAll()
' Iterate through each SearchResult in the SearchResultCollection.
Dim resEnt1 As SearchResult
For Each resEnt1 In ResEnt
If IsDBNull(resEnt1.Properties("company")) Then
valueCompany = NoValueString
Else
valueCompany = resEnt1.Properties("company").ToString
'valueCompany = CStr(resEnt1.Properties("company")(0))
End If