EssGetObject

Description

EssGetObject() copies an object from the server or client object system to a local file, and optionally locks it.

Syntax
ESS_FUNC_M EssGetObject (hCtx, ObjType, AppName, DbName, ObjName, LocalName, Lock);
ESS_HCTX_ThCtx
ESS_OBJTYPE_TObjType
ESS_STR_TAppName
ESS_STR_TDbName
ESS_STR_TObjName
ESS_STR_TLocalName
ESS_BOOL_TLock

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.
DbNameDatabase name. If NULL, uses the application subdirectory.
ObjNameName of object to get.
LocalNameFull path name of local destination file on client.
LockFlag to control object locking. If TRUE, the server object is locked to prevent updates by other users.

Return Value

If successful, the object is copied to the local file specified by LocalName.

Notes

Access

This function requires the caller to have the appropriate level of access to the specified application and/or database containing the object (depending on the object type). To lock the object (lock flag is TRUE), the caller must have application or Database Designer privilege (ESS_PRIV_APPDESIGN or ESS_PRIV_DBDESIGN) for the specified application or database containing the object.

Example

ESS_FUNC_M 
ESS_GetObject (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;     
   ESS_STR_T         LocalName;
   ESS_BOOL_T        Lock; 
   
   
   AppName = "Sample";
   DbName  = "Basic";
   ObjName = "Basic";
   ObjType = ESS_OBJTYPE_OUTLINE; 
   LocalName = "c:\\essbase\\client\\Basic.otl";
   Lock    = ESS_TRUE;
   
   sts = EssGetObject (hCtx, ObjType, AppName,
         DbName, ObjName, LocalName, Lock); 
   return (sts);
}

See Also

EssGetObjectInfo()
EssListObjects()
EssLockObject()
EssPutObject()
EssUnlockObject()