ldap_delete
Remove a leaf entry in the LDAP Directory Information Tree.
int ldap_delete
(in server_url varchar,
in try_tls integer,
in entrydn varchar,
in username varchar,
in password varchar);
Description
This function removes a leaf entry in the LDAP Directory Information Tree.
Parameters
server_url –
The server URL has three parts, <protocol>://<host>:<port>.
Missing parameters will be defaulted to <ldap://localhost:389>.
try_tls –
try_tls is a flag that tells the client to perform a handshake
with the LDAP server using a secure connection. This is only applicable to the ldap:// protocol and not
ldaps://. If a secure connection cannot be made, the client will fall
back to using an insecure connection.
entrydn –
entrydn is a qualified string which represents the LDAP DN entry to be deleted.
username –
username authorization credential
password –
password authorization credential
Return Types
Zero for success or error code.
Errors
SQLState |
Error Code |
Error Text |
Description |
2E000
|
LD005
|
Failed to initialize LDAP connection: <reason> (<reason code>)
|
|
2E000
|
LD006
|
Failed to set LDAP version option: <reason> (<reason code>)
|
|
2E000
|
LD016
|
Failed to start TLS: <reason> (<reason code>)
|
|
28000
|
LD007
|
Failed to bind synchronous LDAP connection: <reason> (<reason code>)
|
|
39000
|
LD012
|
Failed to delete the DN entry: <reason> (<reason code>)
|
|
|
|
|
|
Examples
if (not ldap_delete ('ldap://localhost', 0,
'cn=John Atanasov,mail=hellraisor@hotmail.com,c=US,o=hotmail.com', NULL))
{
-- the entry removed successfully, we can perform some other action
}