EsbAutoLogin

Displays a dialog box that allows the user to log in to an Essbase Server, and optionally select an active application and database.

Syntax

EsbAutoLogin (hInst, Server, User, Password, AppName, DbName, opt, pAccess, phCtx)
ByVal hInst    As Long
ByVal Server   As String
ByVal User     As String
ByVal Password As String
ByVal AppName  As String
ByVal DbName   As String
ByVal opt      As Integer
      pAccess  As Integer
      phCtx    As Long
ParameterDescription

hInst

VB API instance handle.

Server

Network server name string.

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.

Password

Password string.

AppName

Application name.

DbName

Database name.

Options

Options flag. Values:

  • ESB_AUTO_NODIALOG—Attempts to log the user in without displaying the dialog, using the default settings (from the above arguments).

  • ESB_AUTO_NOSELECT—Allows the user to log in without selecting an application and database (lower part of the dialog is not displayed).

    You can add ESB_AUTO_NODIALOG and ESB_AUTO_NOSELECT together to log in a user without a dialog box and not select an application and database:

    ESB_AUTO_NODIALOG + ESB_AUTO_NOSELECT
  • ESB_AUTO_DEFAULT—Allows the user to log in and select an application and database interactively in the dialog box.

pAccess

Address of variable to receive database access level.

phCtx

Address of variable to receive Essbase context handle.

Notes

Return Value

If successful, returns an Essbase context handle in phCtx, which can be passed as an argument in subsequent calls to other VB API functions. Also returns the user's access level to the selected application and database (if selected) in pAccess.

Access

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

Example

Declare Function EsbAutoLogin Lib "ESBAPIN" (ByVal hInst As Long, ByVal Server As String, _
                                             ByVal User As String, ByVal Password As String, _
                                             ByVal AppName As String, ByVal DbName As String, _
                                             ByVal Opt As Integer, pAccess As Integer, _
                                             phCtx As Long) As Long
Sub ESB_AutoLogin ()
   Dim sts As Long
   Dim Server As String * ESB_SVRNAMELEN
   Dim User As String * ESB_USERNAMELEN
   Dim Password As String * ESB_PASSWORDLEN
   Dim AppName As String * ESB_APPNAMELEN
   Dim DbName As String * ESB_DBNAMELEN
   Dim pOption As Integer
   Dim pAccess As Integer
   Dim hCtx As Long 
   '**********************
   ' Initialize parameters
   '********************** 
   Server = "Server"
   User = "User"
   Password = "Password"
   AppName = ""
   DbName = ""
   pOption = ESB_AUTO_DEFAULT 
   '************************
   ' Login to Essbase Server
   '************************ 
   sts = EsbAutoLogin (hInst, Server, User, Password, AppName, DbName, pOption, pAccess, hCtx)
End Sub

See Also