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);
Parameter | Data Type | Description |
---|---|---|
hCtx | ESS_HCTX_T | API context handle. Can be local context handle returned by EssCreateLocalContext(). |
ObjType | ESS_OBJTYPE_T | Object type (must be single type). Refer to Bitmask Data Types (C) for a list of possible values. |
AppName | ESS_STR_T | Application name. |
DbName | ESS_STR_T | databasename. If NULL, uses the application subdirectory. |
ObjName | ESS_STR_T | Name of object to lock. |
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.
Return Value
None.
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