EsbLROGetObject

Description

EsbLROGetObject() retrieves an object linked to a data cell in an Essbase database.

Syntax

EsbLROGetObject (hCtx, pLinkId, targetFile, usOption, pLRODesc)

ByVal hCtx       As Long 
      pLinkId    As ESB_LROHANDLE_API_T
ByVal targetFile As String 
ByVal usOption   As Integer 
      pLRODesc   As ESB_LRODESC_API_T

Parameters

hCtx Essbase API context handle.
pLinkId Pointer to object identification structure. The link ID is returned by EsbLROAddObject() through the ESB_LRODESC_API_T structure.
targetFile The name of the target file into which the object is retrieved.
usOption Option specifying whether to retrieve the object, its catalog entry, or both. Use one of the following:
  • ESB_LRO_OBJ_API retrieves only the object.
  • ESB_LRO_CATALOG_API retrieves only the catalog entry.
  • ESB_LRO_BOTH_API retrieves object and catalog entry.
pLRODesc Object's description structure, ESB_LRODESC_API_T.

Return Value

If successful, returns ESB_STS_NOERR. Otherwise, returns an error code.

Notes

Access

A call to this function requires read privileges (ESB_PRIV_READ) for the data cell or the active database.

Example

Declare Function EsbLROGetObject Lib "esbapin" _
(ByVal hCtx As Long, pLinkID As ESB_LROHANDLE_API_T, _
ByVal targetFile As String, ByVal usOption As Integer, _
pLRODesc As ESB_LRODESC_API_T) As Long

Public Sub ESB_LROGetObject()

   Dim Desc As ESB_LRODESC_API_T
   Dim LinkID As ESB_LROHANDLE_API_T
   Dim TargetFile As String
   Dim opt As Integer
   Dim InputMsg As String
   
   LinkID.hObject = 1
   LinkID.cellKey.cellOffset = 0
   LinkID.cellKey.blkOffset = 198
   LinkID.cellKey.segment = 0
   
   TargetFile = "c:\docs\myfile.doc"
   
   InputMsg="Danger, Will Robinson"
   opt = InputBox(InputMsg, , ESB_LRO_BOTH_API)
   
   sts = EsbLROGetObject(hCtx, LinkID, TargetFile, _
                         opt, Desc)
End Sub

See Also

LRO Constant and Structure Definitions
EsbLROAddObject()
EsbLROGetMemberCombo()
EsbLROUpdateObject()
EsbLRODeleteObject()