EssListGroups

Description

EssListGroups() lists all groups who have access to a particular Essbase server, application or database.

Syntax

ESS_FUNC_M EssListGroups (hCtx, AppName, DbName, pCount, ppGroupList);
ESS_HCTX_ThCtx
ESS_STR_TAppName
ESS_STR_TDbName
ESS_PUSHORT_TpCount
ESS_PPGROUPINFO_T ppGroupList

Parameters

hCtxEssbase API context handle.
AppNameApplication name. If NULL, lists all groups.
DbNamedatabasename. If NULL, lists groups for all databases within application.
pCountAddress of variable to receive count of groups.
ppGroupListAddress of pointer to receive an allocated array of group info structures.

Return Value

If successful, returns a count of the number of groups in pCount, and list of groups with access to the specified application and database in ppGroupList.

Notes

Access

This function requires no special privileges.

Example

ESS_FUNC_M
ESS_ListGroups (ESS_HCTX_T  hCtx,
                ESS_HINST_T hInst
               )              
{
   ESS_FUNC_M        sts = ESS_STS_NOERR;
   ESS_USHORT_T     Count;
   ESS_PGROUPINFO_T Groups = NULL; 
   ESS_USHORT_T      ind;
   sts = EssListGroups (hCtx, NULL, NULL, &Count, &Groups);
   if (!sts)
   {   
     if (Count && Groups)
     {
       printf ("\r\n-----Group List-----\r\n\r\n");
       for (ind = 0; ind < Count; ind++)
         printf ("Name->%s\r\n", Groups [ind].Name);
       EssFree (hInst, Groups);
     }      
     else
       printf ("\r\nGroup List is Empty\r\n\r\n");
   }         
   
  return (sts);
}

See Also

EssGetGroup()
EssListUsers()