ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Communication / LDAP functions
  • Differences between LDAPReplaceAttribute and LDAPReplaceAttributeValue
  • Modifying an existing object on an LDAP server
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
LDAPReplaceAttribute (Function)
In french: LDAPRemplaceAttribut
Replaces all the values of an attribute by a specific value.
Example
// Modifies a specific value of an attribute
// (the read operation was performed on the server beforehand)
// The existing values are found in sValue1, sValue2 and sValue3
// sValue2 must be replaced with sNewValue
LDAPStartModify("SessionName")
LDAPReplaceAttribute("SessionName", "AttributeName", sNewValue)
LDAPAddAttribute("SessionName", "AttributeName", sValue1)
LDAPAddAttribute("SessionName", "AttributeName", sValue3)
LDAPValidateModify("SessionName", "DN")
Syntax
<Result> = LDAPReplaceAttribute(<LDAP session> , <Attribute name> , <Attribute value>)
<Result>: Boolean
  • True if the modification was performed,
  • False otherwise. ErrorInfo returns more details about the error. The modification will be performed during the call to LDAPValidateModify.
<LDAP session>: Character string
Name of LDAP session used.
<Attribute name>: Character string
Name of attribute to use.
<Attribute value>: ANSI character string
New attribute value.
Remarks

Differences between LDAPReplaceAttribute and LDAPReplaceAttributeValue

LDAPReplaceAttribute is used to replace all the values of an attribute by a single value. A multi-valued attribute (several values for this attribute) will become a single-valued attribute (a single value for this attribute).
LDAPReplaceAttributeValue is used to replace a specific value of an attribute by a new value. A multi-valued attribute remains a multi-valued attribute.

Modifying an existing object on an LDAP server

To modify an existing object in an LDAP server, you must define the different modifications to perform.
To optimize the modification speed of objects, the modifications are defined locally: a single communication is established with the server when validating the modification. The steps are:
  1. Start modification (LDAPStartModify).
  2. Modification operations:
  3. Validate the modifications on the server (LDAPValidateModify). The modifications are performed on the server according to the order used in the WLanguage code.
Caution: These operations being performed locally then on the server, the logical order of the modifications must be respected (you cannot for example modify an attribute that was already deleted by the previous line of code).
Component: wd290com.dll
See also
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