Lists all users who have access to a particular Essbase Server, application or database.
Syntax
EsbListUsers (hCtx, AppName, DbName, pItems) ByVal hCtx As Long ByVal AppName As String ByVal DbName As String pItems As Integer
| Parameter | Description |
|---|---|
hCtx | VB API context handle |
AppName | Application name. If an empty string, lists all users |
DbName | Database name. |
pItems | Address of variable to receive count of users |
Notes
If both AppName and DbName are not empty strings, only users with access to the specified application and database will be listed. If DbName is an empty string, only users with access to the specified application will be listed. If AppName is an empty string, all users that exist on the server will be listed.
The list of users with access to the specified application and database--which is accessible via EsbGetNextItem()--is returned as a list of ESB_USERINFO_T structures. The AppName and DbName fields of these returned user info structures contain NULL values.
Return Value
If successful, returns a count of the number of users in pCount, and generates a list of users with access to the specified application and database that is accessible via EsbGetNextItem().
Access
This function requires no special privileges.
Example
Declare Function EsbListUsers Lib "ESBAPIN" (ByVal hCtx As Long, ByVal AppName As String, ByVal DbName As String, Count As Integer) As Long
Sub ESB_ListUsers ()
Dim Count As Integer
Dim AppName As String
Dim DbName As String
Dim UserInfo As ESB_USERINFO_T
Dim sts As Long AppName = "Sample"
DbName = "Basic" '***********
' List Users
'***********
sts = EsbListUsers (hCtx, AppName, DbName,
Count) For n = 1 To Count '*****************************
' Get next User Info structure
' from the list
'*****************************
sts = EsbGetNextItem (hCtx,
ESB_USERINFO_TYPE, UserInfo)
Next
End Sub See Also