Sets the default calc script for the active database from a calc script file.
Syntax
ESS_FUNC_M EssSetDefaultCalcFile (hDestCtx, hSrcCtx, AppName, DbName, FileName);
Parameter | Data Type | Description |
---|---|---|
hDestCtx | ESS_HCTX_T | API context handle of target database on the server. |
hSrcCtx | ESS_HCTX_T | API context handle for calc script file location. The calc script file can reside on the client or on the same server as the target database. |
AppName | ESS_STR_T | Application name for calc script file location |
DbName | ESS_STR_T | Database name for calc script file location |
FileName | ESS_STR_T | Name of default calc script file |
Notes
The default calc script must not be greater than 64 KB long.
The server makes a copy of the text in the calc script file when this function is called. Subsequent changes to the calc script file have no effect on the default calc unless this function is called again to update it.
Return Value
None.
Access
This function requires the caller to have calc privilege (ESS_PRIV_CALC) to the active database.
Example
ESS_FUNC_M ESS_SetDefaultCalcFile (ESS_HCTX_T hCtx) { ESS_FUNC_M sts = ESS_STS_NOERR; ESS_HCTX_T hSrcCtx; ESS_STR_T AppName; ESS_STR_T DbName; ESS_STR_T FileName; AppName = "Sample"; DbName = "Basic"; FileName = "DefTest"; hSrcCtx = hCtx; sts = EssSetDefaultCalcFile (hCtx, hSrcCtx, AppName, DbName, FileName); return(sts); }
See Also