EssListUsers

Lists all users who have access to a particular Essbase Server, application or database.

Syntax

ESS_FUNC_M EssListUsers (hCtx, AppName, DbName, pCount, ppUserList);
ParameterData TypeDescription

hCtx

ESS_HCTX_T

API context handle.

AppName

ESS_STR_T

Application name. If NULL, lists all users.

DbName

ESS_STR_T

Database name. If NULL, lists users for all databases within the application.

pCount

ESS_PUSHORT_T

Address of variable to receive count of users.

ppUserList

ESS_USERINFO_T, ESS_GROUPINFO_T

Address of pointer to receive an allocated array of user info structures. The AppName and DbName fields of the returned user info structures contain contain NULL values.

Notes

Return Value

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

Access

This function requires no special privileges.

Example

ESS_STS_T
ESS_ListUsers (ESS_HCTX_T  hCtx,
               ESS_HINST_T hInst
              )
{
   ESS_STS_T        sts;
   ESS_USHORT_T     Count;
   ESS_PUSERINFO_T  Users = NULL;
   ESS_USHORT_T     ind;
   
   sts = EssListUsers (hCtx, NULL, NULL, &Count,
         &Users); 
   if (!sts)
   {
      if (Count && Users)
      {
printf ("\r\n-------User List-------\r\n\r\n");    
         for (ind = 0; ind < Count; ind++)
         {
printf ("Name->%s Application->%s database->%s\r\n",
         Users[ind].Name, Users[ind].AppName,
         Users[ind].DbName);
         }
         EssFree (hInst, Users);        
      }
      else
printf ("\r\nUsers list is empty\r\n\r\n");    
   }
   return (sts);
}

See Also