# EsbListGroups

Description

EsbListGroups() lists all groups who have access to a particular Essbase server, application or database.

Syntax

    EsbListGroups (hCtx, AppName, DbName, pItems)

    ByVal hCtx    As Long
    ByVal AppName As String
    ByVal DbName  As String
          pItems  As Integer

Parameters

hCtx | Essbase VB API context handle.
AppName | Application name. If an empty string, lists all groups.
DbName | Database name. If an empty string, lists groups for all databases within application.
pItems | Address of variable to receive Items of groups.

Return Value

If successful, returns a Items of the number of groups in pItems, and generates a list of groups with access to the specified application and database accessible via EsbGetNextItem().

Notes

- If both AppName and DbName are not an empty string, only groups with access to the specified application and database will be listed. If DbName is an empty string, only groups with access to the specified application will be listed. If AppName is an empty string, all groups on the logged in server will be listed.

Access

This function requires no special privileges.

Example

    Declare Function EsbListGroups Lib "ESBAPIW" (ByVal hCtx As Long, ByVal AppName As String, ByVal DbName As String, Items As Integer) As Long

    Sub ESB_ListGroups ()
       Dim Items As Integer
       Dim AppName As String
       Dim DbName As String
       Dim GroupInfo As ESB_USERINFO_T
       Dim sts As Long

       AppName = "Sample"
       DbName = "Basic"

       '************
       ' List Groups
       '************
       sts = EsbListGroups (hCtx, AppName, DbName,
             Items)

       For n = 1 To Items

         '*************************
         ' Get next Group structure
         ' from the list
         '*************************
         sts = EsbGetNextItem (hCtx,
               ESB_GROUPINFO_TYPE, GroupInfo)
       Next
    End Sub

See Also

EsbGetGroup()
EsbListUsers()
EsbGetNextItem()