# EssDeleteObject

Description

EssDeleteObject() deletes an existing object.

Syntax

    ESS_FUNC_M EssDeleteObject (hCtx, ObjType, AppName, DbName, ObjName);

ESS_HCTX_T | hCtx
ESS_OBJTYPE_T | ObjType
ESS_STR_T | AppName
ESS_STR_T | DbName
ESS_STR_T | ObjName

Parameters

hCtx | Essbase API context handle.
ObjType | Object type (must be single type).
AppName | Application name.
DbName | Database name. If NULL, uses the application subdirectory.
ObjName | Object name to delete.

Return Value

None.

Notes

- To delete an object, the object must not be locked.
- Outline objects cannot be deleted. Use the EssDeleteDatabase() function to delete a database, including its associated outline.

Access

This function requires the caller to have Application or Database Design privilege (ESS_PRIV_APPDESIGN or ESS_PRIV_DBDESIGN) for the specified application or database containing the object.

Example

    ESS_FUNC_M
    ESS_DeleteObject (ESS_HCTX_T  hCtx)
    {
       ESS_FUNC_M         sts = ESS_STS_NOERR;
       ESS_STR_T         AppName;
       ESS_STR_T         DbName;
       ESS_STR_T         ObjName;
       ESS_OBJTYPE_T     ObjType;
       AppName = "Sample";
       DbName  = "Basic";
       ObjName = "Test";
       ObjType = ESS_OBJTYPE_TEXT;
       sts = EssDeleteObject(hCtx, ObjType, AppName,
             DbName, ObjName);
       return (sts);
    }

See Also

EssCreateObject()
EssListObjects()