WebLdapValueAdd Function

Action

Adds, replaces or deletes an attribute value of an LDAP directory entry.

Include file

WebAPI.bdh

Syntax

WebLdapValueAdd( in hLdap   : number, 
                 in sValue  : string, 
                 in nLength : number optional ) : boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hLdap Handle to a Web connection that was created by WebLdapConnect
sValue Specifies one of the attribute values to add, delete or replace. To assign multiple values to an attribute, this function must be called multiple times.
nLength Length of the attribute value (optional). Passing this parameter to the function is necessary if the attribute value contains binary data.

Example

dcltrans
  transaction TMain 
  var
    hLdap: number; 
  begin
    WebLdapConnect(hLdap, "standardhost", WEB_PORT_LDAP);
    WebLdapBind(hLdap, "cn=adminname", "password");
    WebLdapAttributeAdd(hLdap, WEB_LDAP_MOD_REPLACE, "attribute"); 
    WebLdapValueAdd(hLdap, "value");
    WebLdapModify(hLdap, "cn=TestCN,o=Name");
    WebLdapDisconnect(hLdap); 
  end TMain;

SilkEssential sample

LDAP.sep