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
Parameter | Description |
---|---|
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:
|
pAccess | Address of variable to receive database access level. |
phCtx | Address of variable to receive Essbase context handle. |
Notes
The dialog box returned by this function is automatically managed by the function, and provides features in the login dialog to change the user password, display the database note message, etc., and so provides a standardized and powerful login screen for all applications using the VB API.
Use this function instead of the EsbLogin function if you are programming in the Windows environments.
The function should be called after executing a successful call to EsbInit, and prior to making any other VB API calls which require a context handle argument.
This function is supported only in the Windows environments. It is not supported in UNIX environments.
The string arguments Server, User, Password, AppName or DbName must be included. They may optionally be an empty string. If any are not an empty string, the buffers they point to are updated on returning from the function with the actual values selected by the user from the dialog box. If any of the passed-in arguments point to valid strings, they are used as the default displayed values in the dialog. The buffers for these arguments must be large enough to contain any possible return value, not just the values passed in.
If the login is successful, the server and user names are automatically stored (in the file ESSBASE.INI) and are used as the defaults the next time this function is called (unless those arguments are specified in subsequent calls). The names of all servers which have been successfully connected to are also stored and displayed.
The auto login dialog box is a child window of the current active window (the window that has the focus). Therefore avoid destroying the active window or changing focus while the auto login dialog is displayed.
This function returns a value of ESB_STS_CANCEL if the user presses the Cancel button or the Esc key in the dialog box.
In Windows environments, if the end user clicks the Help button, the Essbase System Login help topic shipped with the Oracle Essbase Spreadsheet Add-in User's Guide online help is opened. You can redirect the Help button to point to a different help file by specifying a different help file name in the ESB_INIT_T structure.
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