ldap_delete()--Perform an LDAP Delete Operation
Syntax
#include <ldap.h> int ldap_delete( LDAP *ld, const char *dn)
Default Public Authority: *USE
Library Name/Service Program: QSYS/QGLDCLNT
Threadsafe: Yes
The ldap_delete() routine initiates an asynchronous LDAP operation to delete a leaf entry. The result of the operation can be obtained by a subsequent call to ldap_result().
Note that the entry to delete must be a leaf entry (that is, it must have no children). Deletion of entire subtrees in a single operation is not supported by LDAP.
Authorities and Locks
No IBM® i authority is required. All authority checking is done by the LDAP server.
Parameters
- ld
- (Input) Specifies the LDAP pointer returned by a previous call to ldap_init(), ldap_ssl_init(), or ldap_open().
- dn
- (Input) Specifies the DN of the entry to be deleted.
Return Value
- Message ID of the Operation Initiated
- If the request was successful.
- -1
- If the request was not successful.
Error Conditions
If ldap_delete() is not successful, ld_errno will be set to indicate the error. See LDAP Client API Error Conditions for possible LDAP error code values. Use ldap_get_errno() function to retrieve the error information.
Error Messages
The following message may be sent from this function.
Message ID | Error Message Text |
---|---|
CPF3CF2 E | Error(s) occurred during running of ldap_delete API. |
Related Information
- ldap_delete_s() -- Synchronous delete an entry.
- ldap_delete_ext() -- Asynchronous delete an entry with controls.
- ldap_delete_ext_s() -- Synchronous delete an entry with controls.
API introduced: V4R3
[ Back to top | LDAP APIs | APIs by category ]