EsbLoginSetPassword

Description

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

Parameters

hInstanceEssbase API instance handle
ServerNetwork server name
UserNameUser name
PasswordOld password
NewPasswordNew password
ItemsNumber of accessible databases
hCtxEssbase context handle

Return Value

If successful, EsbLoginSetPassword():

Notes

Access

Before you call EsbLoginSetPassword(), call EsbInit() to initialize the API, and obtain a valid instance handle.

Example

Declare Function EsbLoginSetPassword Lib "ESBAPIW" (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

EsbAutoLogin()
EsbInit()
EsbListDatabases
EsbLogout()
EsbSetActive()