EssListAliases
Description
EssListAliases() lists all the alias tables in the active
database.
Syntax
ESS_FUNC_M EssListAliases (hCtx, pCount ppAliasList);
ESS_HCTX_T | hCtx |
ESS_PUSHORT_T | pCount |
ESS_PPALIASNAME_T | ppAliasList |
Parameters
hCtx | Essbase API context handle. |
pCount | Address of variable to receive count of alias tables.
|
ppAliasList | Address of pointer to receive an allocated array of alias table names.
|
Return
Value
If successful, this function returns a count of alias tables in
pCount, and an allocated array of alias table names in
ppAliasList.
Notes
- The memory allocated for ppAliasList should be freed
using EssFree().
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_ListAliases (ESS_HCTX_T hCtx,
ESS_HINST_T hInst
)
{
ESS_FUNC_M sts = ESS_STS_NOERR;
ESS_USHORT_T Count;
ESS_USHORT_T ind;
ESS_PALIASNAME_T Altlist = NULL;
sts = EssListAliases (hCtx, &Count, &Altlist);
if (!sts)
{
if (Count && Altlist)
{
printf ("\r\n-----List of Aliases-----\r\n\r\n");
for (ind = 0; ind < Count; ind++)
{
if (Altlist [ind] != NULL)
printf ("%s\r\n", Altlist[ind]);
}
EssFree (hInst, Altlist);
}
else
printf ("\r\nAlias List is Empty\r\n\r\n");
}
return (sts);
}
See
Also
EssDisplayAlias()
EssSetActive()