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);
ParameterData TypeDescription

hCtx

ESS_HCTX_T

API context handle.

pString

ESS_PSTR_T

Address of pointer to receive allocated returned data string.

Notes

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.

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