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
ParameterDescription

hDestCtx

VB API context handle of a target database on the server.

hSrcCtx

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.

AppName

Application name for the calc script file location.

DbName

Database name for the calc script file location.

FileName

Name of the default calc script file.

Notes

The default calc script must not be greater than 64 KB long.

Return Value

None.

Access

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

Example

Declare Function EsbSetDefaultCalcFile Lib "ESBAPIN" (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