EsbSetDefaultCalcFile

Description

EsbSetDefaultCalcFile() sets the default calc script for the active database from a calc script file.

Syntax
EsbSetDefaultCalcFile (hDestCtx, hSrcCtx, AppName, DbName, FileName)
ByVal hDestCtx As Long
ByVal hSrcCtx  As Long
ByVal AppName  As String
ByVal DbName   As String
ByVal FileName As String

Parameters

hDestCtxEssbase VB API context handle of a target database on the server.
hSrcCtxEssbase VB API context handle for the calc script file location. The calc script file can reside on the client or on the same server as the target database.
AppNameApplication name for the calc script file location.
DbNameDatabase name for the calc script file location.
FileNameName of the default calc script file.

Return Value

None.

Notes

Access

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

Example

Declare Function EsbSetDefaultCalcFile Lib "ESBAPIW" (ByVal hDestCtx As Long, ByVal hSrcCtx As Long, ByVal AppName As String, ByVal DbName As String, ByVal FileName As String) As Long

Sub ESB_SetDefaultCalcFile ()
   Dim sts As Long
   Dim AppName As String
   Dim DbName As String
   Dim FileName As String
   Dim hSrcCtx As Long

   AppName = "Sample"
   DbName = "Basic"

   '***************************************
   ' Calc script is an object at the server * 
   '*************************************** 
   hSrcCtx = hCtx
   FileName = "calc" 

   '**********
   ' Calc File
   '**********
   sts = EsbSetDefaultCalcFile (hCtx, hSrcCtx, AppName, DbName, FileName) 
End Sub

See Also

EsbDefaultCalc()
EsbGetDefaultCalc()
EsbSetDefaultCalc()