# EsbOtlDeleteDimension

Description

EsbOtlDeleteDimension() deletes a dimension from the outline. The call also specifies a member of the dimension being deleted from which to keep data when the outline is restructured.

Syntax

    EsbOtlDeleteDimension (hOutline, hMember, pszDataMbr)

    ByVal hOutline   As Long
    ByVal hMember    As Long
    ByVal pszDataMbr As String

Parameters

hOutline | Outline context handle.
hMember | Handle of member to delete.
pszDataMbr | Member name in the dimension to be deleted from which data will be saved when the outline is restructured. If this field is "", the dimension is used.

Return Value

Returns 0 if successful; otherwise one of the following:

OTLAPI_ERR_NOTIMEDIM

Notes

- All shared members of the dimension and its descendants are deleted.
- All members of the dimension are deleted.
- To delete a dimension, you can use this call or EsbOtlDeleteMember(). 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.
- In order for the pszDataMbr field to take effect, the outline must have been opened with EsbOtlOpenOutline() with the fKeepTrans flag set to ESB_YES.

Example

    Declare Function EsbOtlDeleteDimension Lib
    "ESBOTLW" (ByVal hOutline As Long, ByVal hMember As Long,
    ByVal pszDataMbr As String) As Long

    Sub ESB_OtlDeleteDimension()
    Dim sts As Long
    Dim Object As ESB_OBJDEF_T
    Dim hOutline As Long
    Dim hMemberScenario 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,
        "Scenario", hMemberScenario)
    End If

    If sts = 0 And hScenario <> 0 Then
       sts = EsbOtlDeleteDimension(hOutline,
        hMemberScenario, "Actual")
    End If
    End Sub

See Also

EsbOtlDeleteMember()
EsbOtlAddDimension()
EsbOtlAddMember()
EsbOtlFindMember()
EsbOtlGetMemberInfo()