EsbCreateVariable

Description

EsbCreateVariable() creates a new substitution variable or modifies an existing substitution variable if the variable name already exists with the identical server, application, and database values.

Syntax

EsbCreateVariable (hCtx, pVariable)
ByVal hCtx      As Long
      pVariable As ESB_PVARIABLE_T 

Parameters

hCtx Essbase API context handle.
pVariable Pointer to the structure containing the description of the substitution variable being created.

Return Value

If successful, returns zero.

Notes

Example

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

Sub Esb_CreateVariable()

Dim sts As Long
Dim oVariable As ESB_VARIABLE_T

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

   sts = EsbCreateVariable(hCtx, oVariable)

End Sub

See Also

ESB_VARIABLE_T
EsbDeleteVariable()
EsbGetVariable()
EsbListVariables()