Logs in a user, and changes the password. Use this function if the password expires, or must be changed at the next login.
Syntax
EsbLoginSetPassword(hInstance, Server, UserName, Password, _ NewPassword, Items, hCtx) ByVal hInstance As Long ByVal Server As Long ByVal UserName As String ByVal Password As String ByVal NewPassword As String Items As Integer hCtx As Long
Parameter | Description |
---|---|
hInstance | 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 |
UserName | User name. |
Password | Old password. |
NewPassword | New password. |
Items | Number of accessible databases. |
hCtx | Essbase Server context handle. |
Notes
Call EsbLoginSetPassword after you call EsbLogin, and after you receive status code 1051090 (Password has expired), or 1051093 (Change password now).
In Microsoft Windows, consider using EsbAutoLogin, instead of EsbLoginSetPassword.
Free memory allocated for Items using EsbFree.
Return Value
If successful, EsbLoginSetPassword:
Returns in hCtx the Essbase Server context handle.
Returns in Items the number of databases accessible to the user.
Generates a list of accessible databases, which can be read by calling EsbGetNextItem.
Access
Before you call EsbLoginSetPassword, call EsbInit to initialize the API, and obtain a valid instance handle.
Example
Declare Function EsbLoginSetPassword Lib "ESBAPIN" (ByVal hInst As Long, ByVal Server As String, ByVal User As String, _ ByVal Password As String, ByVal NewPassword As String, Items As Integer, hCtx As Long) As Long Sub ESB_LoginSetPassword () Dim hInst As Long Dim Server As String * ESB_SVRNAMELEN Dim User As String * ESB_USERNAMELEN Dim Password As String * ESB_PASSWORDLEN Dim NewPassword As String * ESB_PASSWORDLEN Dim Items As Integer Dim AppDb As ESB_APPDB_T Dim hCtx As Long sts = EsbLoginSetPassword (hInst, Server, User, Password, NewPassword, 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