EssLockObject
Description
EssLockObject() locks an object on the server or the client
object system to prevent other users from updating it.
Syntax
ESS_FUNC_M EssLockObject (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. Can be local context handle returned by EssCreateLocalContext().
|
ObjType | Object type (must be single type). Refer to Bitmask Data Types for a list of possible values.
|
AppName | Application name. |
DbName | databasename. If NULL, uses the application subdirectory.
|
ObjName | Name of object to lock. |
Return Value
None.
Notes
- To lock an object, the object must already exist and not be
locked by another user.
- This function does not retrieve the object. Use EssGetObject()
to retrieve the object.
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_LockObject (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 = "Basic";
ObjType = ESS_OBJTYPE_OUTLINE;
sts = EssLockObject (hCtx, ObjType, AppName,
DbName,ObjName);
if(!sts)
printf("The Object \"%s\" is locked\r\n",
ObjName);
return (sts);
}
See Also
EssGetObject()
EssGetObjectInfo()
EssListObjects()
EssPutObject()
EssUnlockObject()