WebLdapAdd Function

Action

Creates a new LDAP directory entry. Both the WebLdapAttributeAdd and the WebLdapValueAdd function are required to specify the new directory attributes and values.

Include file

WebAPI.bdh

Syntax

WebLdapAdd( in hLdap  : number, 
            in sEntry : string ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hLdap Handle to a Web connection that was created by WebLdapConnect
sEntry Name of the new directory entry

Example

dcltrans 
  transaction TMain 
  var
    hLdap: number; 
  begin
    WebLdapConnect(hLdap, "standardhost", WEB_PORT_LDAP);
    WebLdapBind(hLdap, "cn=adminname", "password");
 
    WebLdapAttributeAdd(hLdap, WEB_LDAP_MOD_ADD, "cn");
    WebLdapValueAdd(hLdap, "firstname lastname");
    WebLdapAttributeAdd(hLdap, WEB_LDAP_MOD_ADD, "sn");
    WebLdapValueAdd(hLdap, "lastname"); 
    WebLdapAdd(hLdap, "cn=myCN,o=Name");
 
    WebLdapDisconnect(hLdap); 
  end TMain;

SilkEssential sample

LDAP.sep