ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Communication / LDAP functions
  • LDAP server and local LDAP object
  • Updating the local LDAP object
  • Accented characters
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
LDAPValue (Function)
In french: LDAPValeur
Returns the value corresponding to the index passed as parameter for the specified attribute.
Example
// Connaître la valeur de l'attribut "UserPassword", indice 2
ValeurAtt = LDAPValue("MaSession", "CN=JP", "UserPassword", 2)
Syntax
<Result> = LDAPValue(<LDAP session> , <Object DN> , <Attribute name> [, <Subscript>])
<Result>: Character string
  • Attribute value for the specified index.
  • Empty string if the value is empty or if an error occurred.
<LDAP session>: Character string
Name of LDAP session used.
<Object DN>: Character string
Distinguished Name (DN) of the object whose attribute value is sought.
<Attribute name>: Character string
Name of attribute whose value is sought. The object attributes are returned by LDAPListAttribute.
<Subscript>: Optional integer
Index of attribute value. If this parameter is not specified, the value of index 1 for the specified attribute is returned.
Remarks

LDAP server and local LDAP object

The LDAP server contains LDAP objects.
The local LDAP object is an LDAP object fetched from the server.

Updating the local LDAP object

When a read LDAP function is run (LDAPListAttribute, LDAPNbValue or LDAPValue), the server object is entirely fetched locally in order to limit the communications with the server. Therefore, if these read functions are called several times with the same DN, the communication with the server is established by the first call. The other calls will read the local object.
The function LDAPValue updates the local LDAP object only if the DN of the object passed in parameter is different from the last DN passed in parameter for one of the following functions: LDAPListAttribute, LDAPNbValue, LDAPValue.
The function LDAPValue does not update the local LDAP object if the DN passed in parameter is identical to the last DN passed in parameter for one of the following functions: LDAPListAttribute, LDAPNbValue, LDAPValue. However, if LDAPValidateAdd and LDAPValidateModify have been used with this same DN, the local object is automatically updated.

Accented characters

If the server uses characters in UTF8, the value of the attribute may have to be converted in order to get the requested result. For example:
ValeurAtt = UTF8ToString(LDAPValue("MaSession", "CN=JP", "UserPassword", 2), charsetAnsi)
Related Examples:
The LDAP functions Unit examples (WINDEV): The LDAP functions
[ + ] Using the WLanguage LDAP functions.
These functions are used to interact with the LDAP data, to view the content of any LDAP directory and to modify the LDAP data: LDAPConnect, LDAPListChildren, LDAPAdAttribute, LDAPDeleteAttributeValue, ...
Component: wd300com.dll
See also
Minimum version required
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help