SetPassword Method (PIUser object)

                 

 

The SetPassword method provides the means to change a user's password on the Server from a client program.

 

Syntax

object.SetPassword OldPassword, NewPassword

The SetPassword method syntax has these parts:

Part

Description

object

An object expression that evaluates to a PIUser object.

OldPassword

A string containing the user's current password.

NewPassword

A string containing the desired new password for the user.

 

Remarks

To successfully change a PIUser object's password, the logged on user must have write access to the server's user database or be logged in as that PIUser. Access permissions on the user database are maintained on the server for security (for PI on Windows NT and UNIX systems this is stored in the DBSecurity table).

 

Trappable Errors

In addition to generic errors (such as Out of Memory), the following errors may occur:

Error

Description

pseACCESSDENIED

Caller does not have sufficient privilege to modify the PIUser

pseUSERSETPASSWORD

Unable to modify the user's password on the server. See the error description for more detail.

Enabling Operational Intelligence