EssSetDefaultCalcFile

Description

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

Syntax

ESS_FUNC_M  EssSetDefaultCalcFile (hDestCtx, hSrcCtx, AppName, DbName, FileName); 
ESS_HCTX_ThDestCtx
ESS_HCTX_ThSrcCtx
ESS_STR_TAppName
ESS_STR_TDbName
ESS_STR_TFileName

Parameters

hDestCtxEssbase API context handle of target database on the server.
hSrcCtxEssbase 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.
AppNameApplication name for calc script file location
DbNameDatabase name for calc script file location
FileNameName of default calc script file

Return Value

None.

Notes

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

EssDefaultCalc
EssGetDefaultCalc()
EssSetDefaultCalc()