Executes the default calculation for the active database.
Syntax
EsbDefaultCalc (hCtx) ByVal hCtx As Long
Parameter | Description |
---|---|
hCtx | VB API context handle. |
Notes
If this function succeeds and the calculation is started, it will continue on the server as an asynchronous process after the return from this call. The caller should check at regular intervals to see if the process has completed by calling EsbGetProcessState() until it returns ESB_STATE_DONE.
To get and set the default calc script, use the functions EsbGetDefaultCalc(), EsbSetDefaultCalc() and EsbSetDefaultCalcFile().
Return Value
None.
Access
This function requires the caller to have calc privilege (ESB_PRIV_CALC) to the active database.
Example
Declare Function EsbDefaultCalc Lib "ESBAPIN" (ByVal hCtx As Long) As Long Sub ESB_DefaultCalc () Dim sts As Long Dim ProcState As ESB_PROCSTATE_T '************************ ' Run default calc script '************************ sts = EsbDefaultCalc (hCtx) '************************************ ' Check process state till it is done '************************************ sts = EsbGetProcessState (hCtx, ProcState) Do Until ProcState.State = ESB_STATE_DONE sts = EsbGetProcessState (hCtx, ProcState) Loop End Sub
See Also