# 22. Virtuoso Functions Guide - ldap_delete

Chapter Contents | Prev | Next
Keyword Search:
www.openlinksw.com
docs.openlinksw.com
Book Home
Contents
Preface
Virtuoso Functions Guide
Administration
Aggregate Functions
Array Manipulation
BPEL APIs
Backup
Compression
Cursor
Date & Time Manipulation
Debug
Dictionary Manipulation
Encoding & Decoding
File Manipulation
Free Text
Hashing / Cryptographic
LDAP
ldap_add
ldap_delete
ldap_modify
ldap_search
Locale
Mail
Miscellaneous
Number
Remote SQL Data Source
Replication
SOAP
SQL
String
Transaction
Type Mapping
UDDI
User Defined Types & The CLR
Virtuoso Java PL API
Virtuoso Server Extension Interface (VSEI)
Web Server & Internet
XML
XPATH & XQUERY
Functions Index

## 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
        }

See Also

ldap_add(), ldap_modify(), ldap_search()