# EsbOtlDeleteMember

Description

EsbOtlDeleteMember() deletes a member from the outline.

Syntax

    EsbOtlDeleteMember (hOutline, hMember)

    ByVal hOutline As Long
    ByVal hMember  As Long

Parameters

hOutline | Outline context handle.
hMember | Handle of member to delete.

Return Value

Returns 0 if successful; otherwise one of the following:

OTLAPI_ERR_LEAFLABEL
OTLAPI_ERR_NOTIMEDIM

Notes

- All descendants of the member are deleted.
- All shared members of this member and its descendants are deleted.
- If a shared member, only the specified member is deleted.
- To delete a dimension, you can use this call or EsbOtlDeleteDimension(). EsbOtlDeleteDimension() gives you the benefit of selecting a member of the deleted dimension whose data values will be used as the data values for the other dimensions when the database is restructured. If EsbOtlDeleteMember() is used, the data values of the top member (dimension) of the deleted dimension are used.

Example

    Declare Function EsbOtlDeleteMember Lib
    "ESBOTLW" (ByVal hOutline As Long, ByVal
    hMember As Long) As Long

    Sub ESB_OtlDeleteMember()
    Dim sts As Long
    Dim Object As ESB_OBJDEF_T
    Dim hOutline As Long
    Dim hCOGS As Long

    Object.hCtx = hCtx
    Object.Type = ESB_OBJTYPE_OUTLINE
    Object.AppName = "Sample"
    Object.DbName = "Basic"
    Object.FileName = "Basic"

    sts = EsbOtlOpenOutline(hCtx, Object,
    ESB_YES, ESB_YES, hOutline)

    If sts = 0 Then
       sts = EsbOtlFindMember(hOutline, "COGS", hCOGS)
    End If

    If sts = 0 And hCOGS <> 0 Then
       sts = EsbOtlDeleteMember(hOutline, hCOGS)
    End If
    End Sub

See Also

EsbOtlDeleteDimension()
EsbOtlAddMember()
EsbOtlAddDimension()
EsbOtlFindMember()
EsbOtlGetMemberInfo()