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 | Essbase 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 context handle. |
Declare Function EsbLogin Lib "ESBAPIW" (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 '***************** 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 SubEsbAutoLogin()