EsbLogin() logs a user in to an Essbase Server. This function should normally be called after executing a successful call to EsbInit(), and prior to making any other VB API calls which require a context handle argument.
EsbLogin (hInst, Server, User, Password, pItems, hCtx)
ByVal hInst As Long
ByVal Server As String
ByVal User As String
ByVal Password As String
pItems As Integer
hCtx As Long
| hInst | VB API instance handle. |
| Server | Network server name string. Required field. |
| User | User name string. Required field. |
| Password | Password string. Required field. |
| pItems | Address of variable to receive Items of accessible applications/databases. |
| hCtx | Pointer to an Essbase Server context handle. |
If successful, returns an Essbase Server context handle in phCtx, which can be used as an argument in subsequent calls to other API functions. Also returns a Items of databases accessible to the specified user in pItems, and generates a list of accessible applications and databases that can be read by calling EsbGetNextItem().
Before calling this function, you must first initialize the API and obtain a valid instance handle by calling the EsbInit() function.
Declare Function EsbLogin Lib "ESBAPIN" (ByVal hInst As Long, ByVal Server As String, ByVal User As String, ByVal Password As String, Items As Integer, hCtx As Long) As Long Sub ESB_Login () Dim hInst As Long Dim Server As String * ESB_SVRNAMELEN Dim User As String * ESB_USERNAMELEN Dim Password As String * ESB_PASSWORDLEN Dim Items As Integer Dim AppDb As ESB_APPDB_T Dim hCtx As Long '***************** ' Login to Essbase Server '***************** sts = EsbLogin (hInst, Server, User, Password, Items, hCtx) For n = 1 To Items '******************************* ' Get next Application/Database ' name combination from the list '******************************* sts = EsbGetNextItem (hCtx, ESB_LAPPDB_TYPE,AppDb) Next End Sub
EsbAutoLogin()
EsbInit()
EsbListDatabases
EsbLogout()
EsbSetActive()
EsbGetNextItem()