Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Database Access / February 2008



Tip: Looking for answers? Try searching our database.

Identifying empty Active Directory attribute Values

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Pete Piper - 12 Feb 2008 16:08 GMT
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
Paul Clement - 12 Feb 2008 21:38 GMT
¤ 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?

Are you referring to attributes that don't exist because they weren't created when the object was
added, or are you referring to attributes that contain a null value?

Paul
~~~~
Microsoft MVP (Visual Basic)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.