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_ThCtx
ESS_OBJTYPE_TObjType
ESS_STR_TAppName
ESS_STR_TDbName
ESS_STR_TObjName

Parameters

hCtxEssbase API context handle. Can be local context handle returned by EssCreateLocalContext().
ObjTypeObject type (must be single type). Refer to Bitmask Data Types for a list of possible values.
AppNameApplication name.
DbNamedatabasename. If NULL, uses the application subdirectory.
ObjNameName of object to lock.

Return Value

None.

Notes

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()