# EsbCheckAttributes

Description

EsbCheckAttributes() returns the attribute information for each specified member.

Syntax

    EsbCheckAttributes (hCtx, Count, AttrNameArray(), AttrTypeArray)

    ByVal hCtx            As Long
    ByVal Count           As Integer
          AttrNameArray() As String
          AttrTypeArray   As Variant

Parameters

hCtx | Context handle
Count | Number of given dimensions and members
AttrNameArray() | An array of names of given dimensions and members
AttrTypeArray | One of the following constant identifiers for the attribute type array: ESB_ATTRIBUTE_DIMENSION ESB_ATTRIBUTE_MEMBER ESB_STANDARD_DIMENSION ESB_STANDARD_MEMBER ESB_BASE_DIMENSION ESB_BASE_MEMBER ESB_ATTRIBUTED_MEMBER ESB_INVALID_MEMBER

Return Value

Returns sts = 0, when successful, and populates AttrTypeArray(). Returns an error if an invalid member name is passed in.

Notes

- Expects a count of names to be entered, and a list of member names.
- Accept a single member name or an array of member names and returns attribute type information for each member entered.
- Member names can be names of attribute dimensions or members and base dimensions or members.

Access

This function requires no special privileges.

Example

       ' NOTE: 'Out' is a sub to print the output within quotes to a listbox or text box.
    Sub ESB_CheckAttributes()
    Dim hCtx as long
    Dim sts as long
    Dim MbrNameArr() As String
    Dim AttrTypeArr As Variant
    Dim Count As Integer
    Dim index As Integer
    Dim test As Integer

       Count = InputBox("Enter the number of attribute members")
       ReDim MbrNameArr(Count)
       For index = 0 To Count - 1
              MbrNameArr(index) = InputBox("Enter attribute member name")
       Next index

       sts = EsbCheckAttributes(hCtx, Count, MbrNameArr, AttrTypeArr)
       If sts = 0 Then
              For index = LBound(AttrTypeArr) To UBound(AttrTypeArr)
             test = AttrTypeArr(index)
                 Select Case test
                      Case ESB_STANDARD_MEMBER
                             Out MbrNameArr(index) & " is of type  ESB_STANDARD_MEMBER"
                      Case ESB_STANDARD_DIMENSION
                             Out MbrNameArr(index) & " is of type  ESB_STANDARD_DIMENSION"
                      Case ESB_BASE_MEMBER
                             Out MbrNameArr(index) & " is of type  ESB_BASE_MEMBER"
                      Case ESB_BASE_DIMENSION
                             Out MbrNameArr(index) & " is of type  ESB_BASE_DIMENSION"
                      Case ESB_ATTRIBUTE_MEMBER
                            Out MbrNameArr(index) & " is of type  ESB_ATTRIBUTE_MEMBER"
                      Case ESB_ATTRIBUTE_DIMENSION
                             Out MbrNameArr(index) & " is of type  ESB_ATTRIBUTE_DIMENSION"
                      Case ESB_ATTRIBUTED_MEMBER
                             Out MbrNameArr(index) & " is of type  ESB_ATTRIBUTED_MEMBER"
                      Case Else
                             Out MbrNameArr(index) & " is of INVALID Type or Invalid Member Name "
                  End Select
              Next index
       Else
              Out "EsbCheckAttributes failed:" & sts: Exit Sub
       End If
    End Sub

See Also

EsbGetAssociatedAttributesInfo()
EsbGetAttributeInfo()
EsbGetAttributeSpecifications()
EsbOtlAssociateAttributeDimension()
EsbOtlAssociateAttributeMember()
EsbOtlDisassociateAttributeDimension()
EsbOtlDisassociateAttributeMember()
EsbOtlFindAttributeMembers()
EsbOtlGetAssociatedAttributes()
EsbOtlGetAttributeInfo()
EsbOtlGetAttributeSpecifications()
EsbOtlQueryAttributes()
EsbOtlSetAttributeSpecifications()