# EssLRODeleteCellObjects

Description

EssLRODeleteCellObjects() deletes all objects linked to a given data cell in an Essbase database. To delete a specific object linked to a cell, use EssLRODeleteObject().

Syntax

    ESS_FUNC_M EssLRODeleteCellObjects (hCtx, memCount, pMemComb, pulLROCount, pLRODescList);

ESS_HCTX_T | hCtx
ESS_ULONG_T | memCount
ESS_PMBRNAME_T | pMemComb
ESS_ULONG_T | pulLROCount
ESS_PLRODESC_API_T | pLRODescList

Parameters

hCtx | Essbase API context handle.
memCount | Number of members specified in pMemComb.
pMemComb | Array of member names.
pulLROCount | Number of LRO catalog entries deleted.
pLRODescList | List of LRO catalog entries deleted.

Return Value

If successful, returns ESS_STS_NOERR. Otherwise, returns an error code.

Notes

- This function deletes all objects linked to the specified cell along with their catalog entries.
- If the object is not stored on the server, only the cell link is destroyed; the file is not deleted.
- The caller is responsible for freeing memory allocated for pLRODescList.

Access

a call to this function requires write privileges (ESS_PRIV_WRITE) to the active database.

Example

    ESS_FUNC_M ESS_LRO DeleteCellObjects (ESS_HCTX_T hCtx, ESS_HINST_T hInst)
    {
    	ESS_LRODESC_API_T		plroDescList=NULL;
    	ESS_PMBRNAME_T		pMemComb = NULL;
    	ESS_ULONG_T			memCount;
    	ESS_FUNC_M 				sts = ESS_STS_NOERR;
    	ESS_ULONG_T			ulLroCount;
    	memCount = 5;
    	sts = EssAlloc(hInst, memCount*sizeof(ESS_MBRNAME_T),
    	               (ESS_PPVOID_T)&pMemComb);
    	if(sts)
    	{
    		printf("Could not allocate memory \n");
    		return sts;
    	}
    	memset(pMemComb, 0, memCount*sizeof(ESS_MBRNAME_T));
    	strcpy( pMemComb[0], "Profit");
    	strcpy( pMemComb[1], "East");
    	strcpy( pMemComb[2], "Actual");
    	strcpy( pMemComb[3], "Colas");
    	strcpy( pMemComb[4], "Year");
    	sts = EssLRODeleteCellObjects(hCtx, memCount, pMemComb, &ulLroCount, &plroDescList);
    	if (sts)
    	{
    		printf ("Could not delete cell objects. \n");
    	}
    	EssFree( hInst, pMemComb);
    	if (plroDescList)
    		EssFree(hInst, plroDescList);
    	return sts;
    }

See Also

LRO Constant and Structure Definitions
EssLROAddObject()
EssLRODeleteObject()
EssLROPurgeObjects()