EssCheckMemberName

Description

EssCheckMemberName() checks if a string is a valid member name within the active database outline.

Syntax

ESS_FUNC_M EssCheckMemberName (hCtx, MbrName, pValid);
ESS_HCTX_ThCtx
ESS_STR_TMbrName
ESS_PBOOL_TpValid

Parameters

hCtxEssbase API context handle.
MbrNameMember name to be verified.
PvalidAddress of variable to receive valid member flag. Set to TRUE if member is valid.

Return Value

If successful, this function returns a flag, pValid, indicating if the name string MbrName is a valid member name in the active database outline.

Notes

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_CheckMemberName(ESS_HCTX_T hCtx) 
{
   ESS_FUNC_M     sts;
   ESS_STR_T      MbrName;
   ESS_BOOL_T     pValid; 
   
   MbrName = "Profit";
   sts = EssCheckMemberName(hCtx, MbrName, &pValid);
   
   if(pValid) 
      printf("\"%s\" is a valid member name\n",
      MbrName);
   
   return (sts);
}

See Also

EssGetMemberInfo()
EssQueryDatabaseMembers()
EssSetActive()