EssListFilters

Description

EssListFilters() lists all filters for a database.

Syntax
ESS_FUNC_M EssListFilters (hCtx, AppName, DbName, Count, ppFilterList);
ESS_HCTX_ThCtx
ESS_STR_TAppName
ESS_STR_TDbName
ESS_PUSHORT_TpCount
ESS_PPFTRNAME_TppFilterList

Parameters

hCtxEssbase API context handle.
AppNameApplication name.
DbNamedatabasename.
pCountAddress of variable to receive count of filter names.
ppFilterListAddress of pointer to receive an allocated array of filter name strings.

Return Value

If successful, returns the count of filters in the database in pCount, and an array of filter names in ppFilterList.

Notes

Access

This function requires the caller to have database Design privilege (ESS_PRIV_DBDESIGN) for the specified database.

Example

ESS_FUNC_M 
ESS_ListFilters (ESS_HCTX_T hCtx, ESS_HINST_T hInst)
{
   ESS_FUNC_M       sts = ESS_STS_NOERR;
   ESS_STR_T       AppName;   
   ESS_STR_T       DbName;
   ESS_USHORT_T    Count = 0;            
   ESS_USHORT_T    ind;
   ESS_PFTRNAME_T  pFilterList = NULL;
   
   AppName = "Sample";
   DbName  = "Basic";
   
   sts = EssListFilters(hCtx, AppName, DbName,
         &Count, &pFilterList);
   
   if(!sts)
   {   
      if(Count && pFilterList)
      {  
printf ("\r\n-------Filter List-------\r\n\r\n");    
         for (ind = 0; ind < Count; ind++)
printf("%s\r\n",pFilterList[ind]);
         EssFree (hInst, pFilterList);        
      }
      else
printf ("\r\nFilter List is empty\r\n\r\n");                                                  
   } 
   return (sts);    
}

See Also

EssGetFilter()
EssSetFilter()