EsbGetAssociatedAttributesInfo

指定した基本メンバーに関連付けられている属性情報を戻します。

構文

            EsbGetAssociatedAttributesInfo
             (
            hCtx
            , 
            MbrName
            , 
            AttrDimName
            , 
            Count
            )
ByVal 
            hCtx
                    As Long
ByVal 
            MbrName
                 As String
ByVal 
            AttrDimName
             As String
      
            Count
                   As Long
         
パラメータ説明

hCtx

コンテキスト・ハンドル

MbrName

基本メンバー名

AttrDimName

(オプション)属性次元名

Count

戻された属性メンバー数

備考

戻り値

正常終了の場合はsts = 0が戻されます。それ以外の場合は、エラー番号が戻されます。

アクセス

この関数を使用するのに、特別な権限は必要ありません。

         Sub ESB_GetAssociatedAttributesInfo()
        ' NOTE: 'Out' is a sub to print the output within quotes to a listbox or text box. 
        Dim hCtx as long
        Dim sts as long   
        Dim MbrName As String
        Dim AttrDimName As String
        Dim Count As Long
        Dim Attribinfo As ESB_ATTRIBUTEINFO_T
        Dim index As Integer
        Dim tempstring As String

        MbrName = InputBox("Base member name", "Base Member Name")
        AttrDimName = InputBox("Attribute Dimension Name (Optional)", "Attribute Dimension Name")

        sts = EsbGetAssociatedAttributesInfo(hCtx, MbrName, AttrDimName, Count)

        If sts <> 0 Then
                MsgBox "Error in ESB_GetAssociatedAttributesInfo: " & sts: Exit Sub
        Else
                tempstring = "...count = " & Count & "..."
                out (tempstring)

                Out "Associated Attr info for " & "[" & MbrName & "]"
                Out "------------------------------------"

                For index = 1 To Count
                        sts = EsbGetNextItem(hCtx, ESB_ATTRIBUTEINFO_TYPE, Attribinfo)
                        Out "Dim Name: " & Attribinfo.DimName
                        Out "Mbr Name: " & Attribinfo.MbrName

                ' NOTE: use of select case statement to discern (and act upon) type of attribute returned
                Select Case VarType(Attribinfo.Attribute)
                        Case vbDouble
                                Out "Data Type    : Numeric(Double)"
                                Out "Data Value   : " & Attribinfo.Attribute
                                Out ""
                        Case vbBoolean
                                Out "Data Type    : Boolean"
                                Out "Data Value   : " & Attribinfo.Attribute
                                Out ""
                        Case vbDate
                                Out "Data Type    : Date"
                                 ' Suggested way to get Date Attribute value for display
                                Out "Data Value   : " & Attribinfo.DimName
                                Out ""
                        Case vbString
                                Out "Data Type    : String"
                                Out "Data Value   : " & Attribinfo.Attribute
                                Out ""
                                End Select
                                Out ""
                        Next index
        End If
End Sub
      

関連トピック