EsbGetLocationAliasList

Description

EsbGetLocationAliasList() returns a list of all currently-defined location aliases, together with lists of the host names, application names, database names and user names to which the location aliases are mapped.

Syntax

EsbGetLocationAliasList (hCtx, ListCount, Aliases, Hosts, _
                         AppNames, DbNames, UserNames)
ByVal hCtx      As Long
ByRef ListCount As Integer
ByRef Aliases   As Variant
ByRef Hosts     As Variant
ByRef AppNames  As Variant
ByRef DbNames   As Variant
ByRef UserNames As Variant

Parameters

hCtx Essbase API context handle
ListCount Number of location aliases returned
Aliases List of location aliases returned
Hosts List of hosts returned
AppNames List of applications returned
DbNames List of databases returned
UserNames List of user logins returned

Return Value

Notes

Access

Example

Public Sub LocationAliasTest()

  Dim status    As Long
  Dim ListCount As Integer
  Dim Aliases   As Variant
  Dim HostNames As Variant
  Dim AppNames  As Variant
  Dim DbNames   As Variant
  Dim UserNames As Variant

  status = EsbCreateLocationAlias(hCtx, "blah1", "LocalHost", "Demo", "Basic", _
                                "admin", "password")
  If (status <> 0) Then
    MsgBox "Create routine Failed"
    Exit Sub
  End If
    
  status = EsbCreateLocationAlias(hCtx, "blah2", "LocalHost", "Demo", "Basic", _
                                  "admin", "password")
  If (status <> 0) Then
    MsgBox "Create routine Failed"
    Exit Sub
  End If
    
  status = EsbGetLocationAliasList(hCtx, ListCount, Aliases, HostNames, _
                                   AppNames, DbNames, UserNames)
  If (status <> 0) Then
    MsgBox "Get routine Failed"
    Exit Sub
  End If
    
  If (ListCount > 0) Then
        ' Retrieve the elements as Aliases(0) to Aliases(ListCount -1)
  End If

  status = EsbDeleteLocationAlias(hCtx, "blah1")
  If (status <> 0) Then
    MsgBox "Delete routine Failed"
    Exit Sub
  End If

  status = EsbGetLocationAliasList(hCtx, ListCount, Aliases, HostNames, _
                                   AppNames, DbNames, UserNames)
  If (status <> 0) Then
    MsgBox "Get routine Failed"
    Exit Sub
  End If

End Sub

See Also

EsbCreateLocationAlias()
EsbDeleteLocationAlias()