Share this page

# mldap_rename_ex

Listing Directory Functions (mldap)

Renames an entry for a specific session.

    int mldap_rename_ex( MLDAP *pldap, char *transaction, char *dn, char *NewDn, LAST );

pldap | An LDAP session identifier.
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`,..."`
newDn | The new Distinguished Name entry information. Use the following format: `"NewDN=`RDN1`,` RDN2`,..."`
LAST | A marker indicating the end of the argument list.

The mldap_rename_ex function replaces a DN entry on the LDAP server for a specific session. You can replace one or more attribute types. For example, if an employee changed their name, you can change the CN attribute. If an employee moved to a different department, you can change the OU attribute.

This function is for use with multiple sessions. For global or single sessions, use the mldap_rename function, which leaves out the 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, NewDn

## Example

In the following example, the mldap_rename_ex function renames the OrganizationalUnitName attribute (OU) from Sales to Marketing.

    mldap_rename_ex(pldap, "LDAP Rename",
             "DN=CN=Sally R. Jones,OU=Sales,DC=TECHNO,DC=com",
             "NewDN=OU=Marketing",
             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: