EsbQueryDatabaseMembers() performs a report-style query to list a selection of database member information.
EsbQueryDatabaseMembers (hCtx, mbrQuery)
ByVal hCtx As Long ByVal mbrQuery As String
hCtx | Essbase VB API context handle. |
mbrQuery | Member query string. A query string is a command similar to a report specification. For descriptions of report specifications refer to the Technical Reference. Valid query strings are listed in Notes, below. String must be less than 64 KBytes in length. |
mbrQuery ==: <selectionstring> [<sortcommand> [<outputcommand>] ]
<CHILDRENOF <ALLINSAMEDIM <DIMTOP <OFSAMEGENERATION <ONSAMELEVELAS <ANCESTORSOF <PARENTOF <DESCENDANTSOF <ALLSIBLINGSOF <LSIBLINGOF
<SORTASCENDING <SORTDESCENDING <SORTNONE <SORTMBRNAMES <SORTALTNAMES <SORTMBRNUMBERS <SORTDIMNUMBERS <SORTLEVELNUMBERS <SORTGENERATION
<outputcommand> ==: Item [separator] | FORMAT {<item> <separator> }
<outputcommand> ==: <MBRNAMES | <ALTNAMES | <MBRNUMBERS | <DIMNUMBERS | <LEVELNUMBERS | <GENERATIONS | <CALCSTRINGS | <UCALCS | <TABSEPARATED | <SPACESEPARATED | <COMMASEPARATED | <NEWLINESEPARATED | <ATTRIBUTES
<FORMAT <item> [<separator>] {<item> [<separator>]}The valid values for <item> are:
MBRNAMES ALTNAMES MBRNUMBERS DIMNUMBERS LEVELNUMBERS GENERATIONS CALCSTRINGS UCALCS ATTRIBUTESATTRIBUTES are listed as the number of attributes followed by a tab-separated list of attribute names.
TABSEPARATED SPACESEPARATED COMMASEPARATED NEWLINESEPARATEDIf you do not specify a separator, the default is TABSEPARATED.
login "local" "user1" "password" "" "" select "attr" "attr" GetMembers "<NEWLINESEPARATED <FORMAT { MBRNAMES SPACESEPARATED ALTNAMES TABSEPARATED MBRNUMBERS SPACESEPARATED DIMNUMBERS TABSEPARATED LEVELNUMBERS SPACESEPARATED GENERATIONS TABSEPARATED CALCSTRINGS SPACESEPARATED UCALCS TABSEPARATED DIMTYPES SPACESEPARATED STATUSES TABSEPARATED ATTRIBUTES } <DESCENDANTS Product "
Declare Function EsbQueryDatabaseMembers Lib "ESBAPIW" (ByVal hCtx As Long, ByVal Query As String) As Long Sub ESB_QueryDatabaseMembers () Dim sts As Long Dim Query As String Const szMString = 256 Dim MString As String * szMString Query = "<ALLINSAMEDIM" '*********************** ' Query Database members '*********************** sts = EsbQueryDatabaseMembers (hCtx, Query) '********************** ' Print out all strings '********************** If sts = 0 Then sts = EsbGetString (hCtx, MString, szMString) Do While Mid$(MString, 1, 1) <> Chr$(0) Print MString sts = EsbGetString (hCtx, MString, szMString) Loop End If End SubEsbCheckMemberName()