# EsbGetVariable

Description

EsbGetVariable() retrieves the value of a substitution variable.

Syntax

    EsbGetVariable (hCtx, pVariable)

    ByVal hCtx      As Long
          pVariable As ESB_PVARIABLE_T

Parameters

hCtx | Context handle to the Essbase API.
pVariable | The pointer to the structure containing the description of the specified substitution variable.

Return Value

If successful, EsbGetVariable() returns the value of the substitution variable in the VarValue field of structure ESB_VARIABLE_T.

Example

    Declare Function EsbGetVariable Lib "esbapin" (ByVal hCtx As Long, pVariable As ESB_VARIABLE_T) As Long

    Sub Esb_GetVariable ()

    Dim sts As Long
    Dim oVariable As ESB_VARIABLE_T

    '  Get value of "QuarterName" Susbtitution Variable at the Sample application level
       oVariable.Server = "Localhost"
       oVariable.AppName = "Sample"
    '  ** Note that DbName has been left empty
       oVariable.VarName = "QuarterName"

       sts = EsbGetVariable(hCtx, oVariable)

       MsgBox oVariable.VarValue

    End Sub

See Also

ESB_VARIABLE_T
EsbCreateVariable()
EsbDeleteVariable()
EsbListVariables()