Returns member relationship information from within one dimension.
Syntax
ESSG_FUNC_M EssGGetMemberInfo (hGrid, pszMbrName, sAction, bAliases, pulMembers, ppszMembers);
Parameter | Data Type | Description |
---|---|---|
hGrid ; | ESSG_HGRID_T | Handle passed back from EssGNewGrid. |
pszMbrName; | ESSG_STR_T | Name of the member for which relationship information will be obtained. |
sAction; | ESSG_SHORT_T | Number indicating what type of relationship information will be returned. The following values are valid for this parameter and are mutually exclusive:
|
bAliases ; | ESSG_BOOL_T | Indicates whether alias names will be returned. |
pulMembers; | ESSG_PULONG_T | Count of members being returned. |
*ppszMembers; | ESSG_PSTR_T | Pointer 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. |
Notes
pszMbrName cannot be null.
Free the ppszMembers parameter using EssGFreeMemberInfo.
Return Value
If successful, returns ESSG_STS_NOERR.
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