# EsbRenameApplication

Description

EsbRenameApplication() renames an existing Application, either on the client or the server. If the Application is running on the server, it is first stopped.

Syntax

    EsbRenameApplication (hCtx, AppName, nAppName)

    ByVal hCtx     As Long
    ByVal AppName  As String
    ByVal nAppName As String

Parameters

hCtx | Essbase VB API context handle.
AppName | Name of an existing application to rename.
nAppName | New name of the application. Application names can be 8 characters long, and can contain all special characters allowed in DOS file names. No spaces, commas, tabs, slashes, backslashes, or periods are allowed. The use of some special characters is not recommended because they are often used by the operating system (for example, @, $, %, and &).

Return Value

None.

Notes

- Renaming a client application renames the local application directory.

Access

For a server application, the caller must have Application Create/Delete/Edit privilege (ESB_PRIV_APPCREATE).

Example

    Declare Function EsbRenameApplication Lib "ESBAPIW" (ByVal hCtx As Long, ByVal OldName As String, ByVal NewName As String) As Long

    Sub ESB_RenameApplication ()
       Dim sts As Long
       Dim OldName As String
       Dim NewName As String

       OldName = "Sample"
       NewName = "NewSamp"

       '*******************
       ' Rename Application
       '*******************
       sts = EsbRenameApplication (hCtx, OldName,
             NewName)
    End Sub

See Also

EsbRenameDatabase()
EsbRenameObject()