# EssLRODeleteObject

Description

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

Syntax

    ESS_FUNC_M EssLRODeleteObject (hCtx, plinkId);

ESS_HCTX_T | hCtx
ESS_PLROHANDLE_API_T | plinkId

Parameters

hCtx | Essbase API context handle.
plinkId | Pointer to object identification structure.

Return Value

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

Notes

- The specified object is deleted and also removed from the Catalog list.
- If the object is not stored on the server, only the cell link is destroyed; the file is not deleted.

Access

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

Example

    ESS_FUNC_M  Ess_LRO DeleteObject (ESS_HCTX_T hCtx)
    {
    	ESS_FUNC_M		sts = ESS_STS_NOERR;
    	ESS_LROHANDLE_API_T	linkId;
    	memset(&linkId, 0, sizeof(ESS_LROHANDLE_API_T));
    	linkId.hObject = 26;
    	linkId.cellKey.cellOffset = 282;
    	linkId.cellKey.blkOffset = 113;
    	linkId.cellKey.segment = 0;
    	sts = EssLRODeleteObject(hCtx, &linkId);
    	if (sts)
    	{
    		printf("Could not delete object\n");
    	}
    	return sts;
    }

See Also

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