# EssGetMemberInfo

Description

EssGetMemberInfo() gets a structure containing information about a specific member in the active database outline.

Syntax

    ESS_FUNC_M EssGetMemberInfo (hCtx, MbrName, ppMbrInfo);

ESS_HCTX_T | hCtx
ESS_STR_T | MbrName
ESS_PPMEMBERINFO_T | ppMbrInfo

Parameters

hCtx | Essbase API context handle.
MbrName | Member name.
ppMbrInfo | Address of pointer to receive allocated member information structure.

Return Value

If successful, this function returns an allocated member information structure, ppMbrInfo. If a member has no parent, this function returns an empty string in the ParentMbrName field of the ESS_MEMBERINFO_T structure.

Notes

- Call EssFree() or EssFreeStructure() to free memory dynamically allocated for ppMbrInfo.
  For an attribute member of type ESS_ATTRMBRDT_STRING, you must call EssFreeStructure() to free memory dynamically allocated for ppMbrInfo. Specify ESS_DT_STRUCT_MBRINFO as the structure ID. EssFree() will not free memory dynamically allocated for an attribute string value.
- The ESS_MBRSTS_ATTRIBUTE constant for the Status field of the ESS_MEMBERINFO_T structure indicates that the dimension or member is an attribute dimension or attribute member.
- Two fields of the ESS_MEMBERINFO_T structure are for attributes only:
  fAttributed Attribute
- This function checks whether the relational span Boolean is set (set by EssSetSpanRelationalPartition) and can return information on members in the relational store.
- Two fields of the ESS_MEMBERINFO_T structure are used only for members in relational stores:
  fHasRelDesc
  fHasRelPartEnabled
- Two fields of the ESS_MBRINFO_T structure are used only for members in relational stores:
  fHasRelDesc
  fHasRelPartEnabled

Access

This function requires the caller to have at least read access (ESS_PRIV_READ) to the database, and to have selected it as their active database using EssSetActive().

Example

    ESS_FUNC_M
    ESS_GetMbrInfo (ESS_HCTX_T  hCtx,
                    ESS_HINST_T hInst
                   )
    {
       ESS_FUNC_M         sts = ESS_STS_NOERR;
       ESS_MEMBERINFO_T  *pMbrInfo = NULL;
       sts = EssGetMemberInfo(hCtx, "Profit",
                    &pMbrInfo);
       if (!sts)
       {
          if (pMbrInfo)
          {
             EssFreeStructure(hCtx, structId, count, structPtr);
          }
       }
       return (sts);
    }

See Also

EssCheckMemberName()
EssFreeStructure()
EssGetMemberCalc()
EssQueryDatabaseMembers()
EssSetActive()