EssGGetMemberInfo

Description

EssGGetMemberInfo() returns member relationship information.

Syntax

ESSG_FUNC_M EssGGetMemberInfo (hGrid, pszMbrName, sAction,
bAliases, pulMembers, ppszMembers);
ESSG_HGRID_T hGrid ;
ESSG_STR_T pszMbrName;
ESSG_SHORT_T sAction;
ESSG_BOOL_T bAliases ;
ESSG_PULONG_T pulMembers;
ESSG_PSTR_T *ppszMembers;

Parameters

hGridHandle passed back from EssGNewGrid.
pszMbrNameName of the member for which relationship information will be obtained.
sActionNumber indicating what type of relationship information will be returned. The following values are valid for this parameter and are mutually exclusive:
  • ESSG_NEXTLEVEL   Children
  • ESSG_ALLLEVELS   All members
  • ESSG_BOTTOMLEVEL    Bottom level
  • ESSG_SIBLEVEL   Sibling level
  • ESSG_SAMELEVEL   Same level
  • ESSG_SAMEGENERATION   Same generation
  • ESSG_CALCLEVEL   Calculation
  • ESSG_PARENTLEVEL    Parent of member
  • ESSG_TOPLEVEL   Dimension member belongs to
bAliasesIndicates whether alias names will be returned.
pulMembersCount of members being returned.
ppszMembersPointer to a one dimensional array of size pulMembers of members returned from the server. The API allocates this memory and should be freed by the caller.

Return Value

If successful, returns ESSG_STS_NOERR.

Notes

Access

None.

Example

ESSG_VOID_T ESSG_GetMemberInfo(ESSG_HGRID_T hGrid)

{
  ESSG_FUNC_M  sts = ESS_STS_NOERR;
  ESSG_STR_T         pszMbrName;
  ESSG_SHORT_T       sAction;
  ESSG_BOOL_T        bAliases;
  ESSG_ULONG_T       ulMembers, ind;
  ESSG_PSTR_T        pszMembers;
  char tmp[5] = "Year";

  pszMbrName = tmp;
  sAction = ESSG_NEXTLEVEL;
  bAliases = ESSG_FALSE;
    
  /* connect the grid to a database on the server */
  sts = EssGConnect(hGrid, "Rainbow", "Admin", 
        "Password", "Demo", "Basic",
        ESSG_CONNECT_NODIALOG);
   
  /* get member information */
  if(sts == 0)
     sts = EssGGetMemberInfo(hGrid,pszMbrName, sAction, bAliases, 
           &ulMembers, &pszMembers);
   
  if (sts == 0)
  {
     printf("\nNext Level of %s:\n", pszMbrName);
for (ind = 0; ind < ulMembers; ind++)
     printf("\t%s\n", *(pszMembers + ind));
       
     EssGFreeMemberInfo(hGrid, ulMembers, pszMembers);
  }
  if(!sts)
     sts = EssGDisconnect(hGrid, 0);   
}

See Also

Using the Grid API Functions
Grid API Structures