EsbAutoLogin() displays a dialog box which allows the user to log in to an Essbase server, and optionally select an active application and database.
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
| hInst | Essbase VB API instance handle. |
| Server | Network server name string. |
| 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. |
Declare Function EsbAutoLogin Lib "ESBAPIW" (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
EsbInit()