6 75 LceUsePassword

LANSA Open Guide

6.75 LceUsePassword

Instructs the session to use the specified password. This function is used in conjunction with LceUseUserId.

BOOL

LceUsePassword

(int

iSession,

 

 

 char far *

strValue )

  

Parameters

iSession

The session identifier as returned by LceGetSessionId.

strValue

The password. The length should not exceed PASSWORD_LONG_LENGTH as defined in the LCOE.H header file.

  

Return Values

TRUE is returned if the session can accept the value.

FALSE is returned if an error occurs.

Notes

This function is used to specify the host user password relating to the User ID specified using LceUseUserId.

If you are using a Windows version of LANSA Open with Client Access/400, this function is optional. The default value is the user profile and password used when the communication to the host was started by Client Access/400. Whilst Client Access/400 has the capability for LANSA Open to provide a password, other routers may not permit this, in which case calls to this function are ignored.

Be careful when using this function. Passwords on the host can be changed, so you should not use passwords in your applications unless they are entered by the user or are encrypted in a file which can be changed.

Portability Considerations

An IBM i requires passwords to be uppercase, therefore the supplied password is converted to uppercase when the Host Type is specified or defaulted to EBCDIC. Windows, Linux or other non-IBM i platforms may have case sensitive passwords using upper and/or lower case characters. No conversion of the password is performed if the Host Type is specified as ASCII.

  

  • This function must be executed after the LceGetSessionId and before the LceOpenSession.
  • This function performs no communications to the host.

Related Functions

6.80 LceUseUserId

6.78 LceUseSystem