Share this page

# mldap_delete

Listing Directory Functions (mldap)

Deletes an entry or attribute.

    int mldap_delete( char *transaction, char *dn, LAST );

transaction | A transaction name for this step. To instruct VuGen not to create a transaction for this step, use a NULL string, "".
dn | A Distinguished Name entry. Use the following format: `"DN=RDN1, RDN2,..."`
LAST | A marker indicating the end of the argument list.

The mldap_delete function deletes an entry or an attribute of an entry. If you specify an entry name, the entire entry will be deleted. If you specify an attribute name, only the attribute will be deleted.

This function is for use with global sessions. For multiple sessions, use the mldap_delete_ex function, which allows you to specify a session identifier.

## Return Values

If this function succeeds, it returns E_OK. Otherwise, it returns a negative value.

## Parameterization

The following argument(s) can be parameterized with standard parameterization: dn

## Example

In the following example, the mldap_delete function deletes a DN entry.

    mldap_delete("LDAP Delete",
         "DN=CN=Alice,OU=Sales,OU=demo,DC=TECHNO,DC=com",
         LAST );

In this example, mldap_delete deletes the DN entry attribute, initials.

    mldap_delete("LDAP Delete",
            "DN=CN=Alice,OU=Sales,OU=demo,DC=TECHNO,DC=com",
             "AttrName=initials",
             LAST );

Tips to improve your search results... VuGen Function Reference Version 26.1 Function Reference 26.1 All View Local Help Center View Online Help Center Version: