Logs in a user 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
Parameter | Description |
---|---|
hInst | VB API instance handle. |
Server | Network server name string. Required field. The server name can be expressed as hostname, hostname:port, or as a URL representing the APS servlet endpoint with the Essbase failover cluster name; for example: http://myhost:13080/aps/Essbase?clustername=Essbase-Cluster1 For secure mode (SSL), the URL syntax is http[s]://host:port/aps/Essbase?ClusterName=logicalName&SecureMODE=yesORno For example, https://myhost:13080/aps/Essbase?clustername=Essbase-Cluster1&SecureMODE=Yes |
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. |
Notes
If you are programming in Microsoft Windows, you should consider using the EsbAutoLogin function instead of EsbLogin.
You can call EsbLogin more than once for the same user name and server. The API returns a unique context handle for each login to the specified server.
Return Value
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.
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 "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
See Also