EsbLogin

Description

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.

Syntax
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

Parameters

hInstEssbase VB API instance handle.
ServerNetwork server name string. Required field.
UserUser name string. Required field.
PasswordPassword string. Required field.
pItemsAddress of variable to receive Items of accessible applications/databases.
hCtxPointer to an Essbase context handle.

Return Value

If successful, returns an Essbase 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().

Notes

Access

Before calling this function, you must first initialize the API and obtain a valid instance handle by calling the EsbInit() function.

Example

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 Sub

See Also

EsbAutoLogin()
EsbInit()
EsbListDatabases
EsbLogout()
EsbSetActive()
EsbGetNextItem()