EsbLoginSetPassword

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
ParameterDescription

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

Return Value

If successful, EsbLoginSetPassword:

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