# EsbSetDefaultCalc

Description

EsbSetDefaultCalc() sets the default calc script for the active database.

Syntax

    EsbSetDefaultCalc (hCtx, cscString)

    ByVal hCtx      As Long
    ByVal cscString As String

Parameters

hCtx | Essbase VB API context handle.
cscString | Default calc script string.

Return Value

None.

Notes

- The calc script string must less than 64 KBytes long.

Access

This function requires the caller to have calc privilege (ESB_PRIV_CALC) to the active database.

Example

    Declare Function EsbSetDefaultCalc Lib "ESBAPIW" (ByVal hCtx As Long, ByVal Script As String) As Long

    Sub ESB_SetDefaultCalc ()
       Dim sts As Long
       Dim Script As String

       Script = "CALC ALL;"

       '*****************
       ' Set default calc
       '*****************
       sts = EsbSetDefaultCalc (hCtx, Script)
    End Sub

See Also

EsbDefaultCalc()
EsbGetDefaultCalc()
EsbSetDefaultCalcFile()
EsbSetActive()