EssGetDefaultCalc

Description

EssGetDefaultCalc() gets the default calc script for the active database.

Syntax
ESS_FUNC_M EssGetDefaultCalc (hCtx, pCalcScript);
ESS_HCTX_ThCtx
ESS_PSTR_TpCalcScript

Parameters

hCtxEssbase API context handle.
pCalcScriptAddress of pointer to receive allocated calc script string.

Return Value

if successful, this function returns the default calc script for the database in pCalcScript.

Notes

Access

This function requires the caller to have at least read access (ESS_PRIV_READ) to the database, and to have selected it as their active database using EssSetActive().

Example

ESS_FUNC_M
ESS_GetDefaultCalc (ESS_HCTX_T  hCtx,
                    ESS_HINST_T hInst
                   )
{
   ESS_FUNC_M     sts = ESS_STS_NOERR;
   ESS_STR_T     cstr = NULL;
   sts = EssGetDefaultCalc(hCtx, &cstr);
   if (!sts)
   {
      if (cstr)
      {
         printf  ("Default Calc Script --\r\n%s\r\n", cstr);
         EssFree (hInst, cstr);
      }
   } 
  return (sts);
}

See Also

EssDefaultCalc()
EssSetActive()
EssSetDefaultCalc()
EssSetDefaultCalcFile()