Share this page

# mldap_rename

Listing Directory Functions (mldap)

Renames an entry.

    int mldap_rename( char *transaction, char *dn, char *NewDn, 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`,..."`
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 function replaces a DN entry on the LDAP server. 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 global sessions. For multiple sessions, use the mldap_rename_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, NewDn

## Example

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

    mldap_rename("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: