Skip Navigation Links
Home
+
About
+
Products
+
Support
+
Purchase
+
Search
+
Exists (Method of LDAPAttributeCollection)
Checks if the attribute exists in the collection.
Syntax
Exists(AttributeName As String) As Boolean
Remarks
Some attributes may only exists under special circumstances, such as a person's involvement in a project. When such attributes are queried, the attribute's existence should first be ensured.
Example
Set pLDAP = CreateObject("LDAPClient.3")
Call pLDAP.Connect("ldapserver")
Set pEntries = pLDAP.Search("o=airius.com", "uid=printer1")

For Each pEntry In pEntries
	If pEntry.Attributes.Exists( "location" ) Then
		MsgBox pEntry.Attributes( "location" ).Values(0).Value
	End If
Next