EssGetString

Description

EssGetString() gets a string of data from the active database. This function should be called after EssReport() or EssEndReport() if data is returned.

Syntax
ESS_FUNC_M EssGetString (hCtx, pString);
ESS_HCTX_ThCtx
ESS_PSTR_TpString

Parameters

hCtxEssbase API context handle.
pStringAddress of pointer to receive allocated returned data string.

Return Value

An allocated pointer to the data string is returned in pString. This pointer will be NULL if there is no more data to be returned.

Notes

Access

This function requires no special privileges.

Example

ESS_FUNC_M
ESS_Report (ESS_HCTX_T   hCtx,
            ESS_HINST_T  hInst
          )
{
   ESS_FUNC_M       sts     = ESS_STS_NOERR;
   ESS_STR_T     rString = NULL;
   sts = EssBeginReport (hCtx,ESS_TRUE,ESS_FALSE);
   if (!sts)
      sts = EssSendString (hCtx, "<Desc Year !");
   if (!sts)
      sts = EssEndReport (hCtx);
   /**************
    * Get report *
    **************/
   
   if (!sts)
      sts = EssGetString (hCtx, &rString);
   while ((!sts) && (rString != NULL))
   {
          printf ("%s", rString);
          EssFree (hInst, rString);
          sts = EssGetString (hCtx, &rString);
   }
   printf ("\r\n"); 
   
   return(sts);
}

See Also

EssEndReport()
EssReport()
EssQueryDatabaseMember()