# EsbLRODeleteCellObjects

Description

EsbLRODeleteCellObjects() deletes all objects linked to a given data cell in an Essbase database. To delete a specific object linked to a cell, use EsbLRODeleteObject().

Syntax

    EsbLRODeleteCellObjects (hCtx, memCount, memComb, PulCount)

    ByVal hCtx     As Long
    ByVal memCount As Long
    ByVal memComb  As String
          PulCount As Integer

Parameters

hCtx | Essbase API context handle.
memCount | Number of members specified in MemComb.
MemComb | String of member names (EOL, CR delimited).
PulCount | Number of LRO catalog entries deleted.

Return Value

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

Notes

- This function deletes all objects linked to the specified cell along with their catalog entries.
- If the object is not stored on the server, only the cell link is destroyed.
- EsbLRODeleteCellObjects() generates a list of the objects it deletes. After calling this function, use EsbGetNextItem() to retrieve information about each deleted object. The example code demonstrates how to do this.

Access

A call to this function requires write privileges (ESB_PRIV_WRITE) to the data cell or the active database.

Example

    Declare Function EsbLRODeleteCellObjects Lib "esbapin" _
    (ByVal hCtx As Long, ByVal memCount As Long, _
    ByVal memComb As String, PulCount As Integer) As Long

    Public Sub ESB_LRODeleteCellObjects()

       Dim Desc As ESB_LRODESC_API_T
       Dim Items As Integer
       Dim memCount As Long
       Dim memComb As String
       Dim i As Integer

       memCount = 5
       memComb = "Jan" & vbCrLf & "Sales" & _
                 "Cola" & vbCrLf & "Utah" & _
                 "Actual"

       sts = EsbLRODeleteCellObjects(hCtx, memCount, _
                                     memComb, Items)

       If sts = 0 Then
          For i = 1 To Items
             '*******************************
             '* Get the next LRO description
             '* item from the list
             '*******************************

             sts = EsbGetNextItem(hCtx, ESB_LRO_TYPE, Desc)

          Next i
       End If

    End Sub

See Also

LRO Constant and Structure Definitions
EsbGetNextItem()
EsbLROAddObject()
EsbLRODeleteObject()
EsbLROPurgeObjects()