# EsbRenameFilter

Description

EsbRenameFilter() renames an existing filter.

Syntax

    EsbRenameFilter (hCtx, AppName, DbName, FltName, nFltName)

    ByVal hCtx     As Long
    ByVal AppName  As String
    ByVal DbName   As String
    ByVal FltName  As String
    ByVal nFltName As String

Parameters

hCtx | Essbase VB API context handle.
AppName | Application name.
DbName | Database name.
FltName | Old name of an existing filter to be renamed.
nFltName | New name of the renamed filter. Filter names can be up to 30 characters long.

Return Value

None.

Notes

- The old filter name must already exist, and the destination filter name must not exist.

Access

This function requires the caller to have Database Design privilege (ESB_PRIV_DBDESIGN) for the specified database.

Example

    Declare Function EsbRenameFilter Lib "ESBAPIW" (ByVal hCtx As Long, ByVal AppName As String, ByVal DbName As String, ByVal OldName As String, ByVal NewName As String) As Long

    Sub ESB_RenameFilter ()
       Dim sts As Long
       Dim AppName As String
       Dim DbName As String
       Dim OldName As String
       Dim NewName As String

       AppName = "Sample"
       DbName = "Basic"
       OldName = "Filter"
       NewName = "NewFilter"

       '**************
       ' Rename Filter
       '**************
       sts = EsbRenameFilter (hCtx, AppName,DbName,
             OldName, NewName)
    End Sub

See Also

EsbCopyFilter()
EsbDeleteFilter()
EsbListFilters()
EsbSetFilter()