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);
ParameterData TypeDescription

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

Database name. If NULL, uses the application subdirectory.

ObjName

ESS_STR_T

Name of object to get.

LocalName

ESS_STR_T

Full path name of local destination file on client.

Lock

ESS_BOOL_T

Flag to control object locking. If TRUE, the server object is locked to prevent updates by other users.

Notes

To lock an object, it must already exist on the server and not be locked by another user. Locking is not supported on the client.

Return Value

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

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:\\Hyperion\\products\\Essbase\\EssbaseClient\\client\\Basic.otl";
   Lock    = ESS_TRUE;
   
   sts = EssGetObject (hCtx, ObjType, AppName,
         DbName, ObjName, LocalName, Lock); 
   return (sts);
}

See Also