AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Funciones WLanguage / Comunicación / Funciones LDAP
  • 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 ==============
PROCEDURE 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
Versión mínima requerida
  • Versión 10
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/05/2022

Señalar un error o enviar una sugerencia | Ayuda local