ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Communication / LDAP functions
  • Using the LDAPListAttribute function
LDAPListAttribute (Example)
Using the LDAPListAttribute function
The following example shows how to use LDAPListAttribute recursively.
// Find the attributes
sListAttributes is string
sListAttributes = LDAPListAttribute("MySession", "DC=pcs,DC=local")
 
// Find the child elements
sListChildren is string
sListChildren = LDAPListChildren("MySession", "DC=pcs,DC=local")
 
// Recursively find the attributes of the child elements
gFindSubChildrenAttributes(sListChildren, sListAttributes)
// ============== recursive use of LDAPListAttribute ==============
PROCÉDURE gFindSubChildrenAttributes(sListC, sListA)
sChildName is string
i is int = 1
sListChildren is string
// Add the attributes into the result
gsListAttributes += sListA + CR
sChildName = ExtractString(sListC, i, CR)
WHILE sChildName <> EOT
// Find the attributes of the child elements
sListAttributes is string
sListAttributes = LDAPListAttribute("MySession", sChildName)
  // Perform the same operation with the children of the child element
  sListChildren = LDAPListChildren("MySession", sChildName)
IF sListChildren <> "" THEN
gFindSubChildrenAttributes(sListChildren, sListAttributes)
ELSE
// Add the attributes into the result
gsListAttributes += sListAttributes + CR
END
i += 1
sChildName = ExtractString(sListC, i, CR)
END
Minimum version required
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help