EsbGetObject

Description

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

Syntax
EsbGetObject (hCtx, ObjType, AppName, DbName, ObjName, LocalName, isLock)
ByVal hCtx      As Long
ByVal ObjType   As Long
ByVal AppName   As String
ByVal DbName    As String
ByVal objName   As String
ByVal LocalName As String
ByVal isLock    As Integer

Parameters

hCtxEssbase VB API context handle. Can be local context handle returned by EsbCreateLocalContext().
ObjTypeObject type (must be single type). Refer to "Bitmask Types."
AppNameApplication name.
DbNameDatabase name. If an empty string, uses the Application sub-directory.
ObjNameName of an object to get.
LocalNameFull path name of a local destination file on client.
isLockFlag 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 Design privilege (ESB_PRIV_APPDESIGN or ESB_PRIV_DBDESIGN) for the specified application or database containing the object.

Example

Declare Function EsbGetObject Lib "ESBAPIW" (ByVal hCtx As Long, ByVal ObjType As Integer, ByVal AppName As String, ByVal DbName As String, ByVal ObjName As String, ByVal LocalName As String, ByVal Lock As Integer)
 As Long

Sub ESB_GetObject ()
   Dim sts As Long
   Dim AppName As String
   Dim DbName As String
   Dim ObjName As String
   Dim ObjType As Long
   Dim LocalName As String
   Dim Lock As Integer

   AppName = "Sample"
   DbName = "Basic"
   ObjName = "Basic"
   ObjType = ESB_OBJTYPE_OUTLINE
   LocalName = "C:\ESSBASE\CLIENT\BASIC.OTL" 
   Lock = ESB_YES

   '***********
   ' Get Object 
   '***********
   sts = EsbGetObject (hCtx, ObjType, AppName,
         DbName, ObjName, LocalName, Lock) 
End Sub

See Also

EsbGetObjectInfo()
EsbListObjects()
EsbLockObject()
EsbPutObject()
EsbUnlockObject()