EssGetAlias

Gets the active alias table name from the active database for a user.

Syntax

ESS_FUNC_M EssGetAlias (hCtx, pAliasName);
ParameterData TypeDescription

hCtx

ESS_HCTX_T

API context handle.

pAliasName

ESS_PSTR_T

Address of pointer to receive allocated name of active alias table.

Notes

The memory allocated for pAliasName should be freed using EssFree().

Return Value

If successful, returns the name of the active alias table in pAliasName.

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_GetAlias (ESS_HCTX_T hCtx, ESS_HINST_T hInst)
{
   ESS_FUNC_M     sts = ESS_STS_NOERR;
   ESS_STR_T     AliasName;
   
   sts = EssGetAlias(hCtx, &AliasName);    
   
   if(!sts && AliasName)
   {
       printf("AliasName: %s\r\n",AliasName);
       EssFree(hInst,AliasName);
   }
       
   return (sts);
}

See Also