Remove Method (PIUsers collection)

                

 

Removes an existing PIUser from a server.

 

Syntax

object.Remove Name

The Remove method syntax has these parts:

Part

Description

object

An object expression that evaluates to a PIUsers collection.

Name

A string containing the user name as returned by the PIUser.Name property.

 

Remarks

Removing a user from the server will only succeed if the caller has write access to the user database on the server. This access is controlled through server specific means to maintain an environment with the desired level of security.

Removing a user that currently owns resources on a server (for example PIPoint objects) can make these resources harder to access.

 

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 remove a PIUser.

pseNOEMPTYSTRINGS

The passed user name may not be blank.

pseUSERNOTFOUND

The passed user name does not exist on the server.

pseUSERREMOVE

Unable to remove the user on the server. See the error description for more information.

Enabling Operational Intelligence