DefaultContext Property (PIUser object)

               

 

A Read/Write string containing the PIUser's default context string as stored on the server. Modifying this property changes the default on the server. This string is also loaded into the user's CurrentContext property when it is first retrieved from the Server. 

 

Syntax

object.DefaultContext

The object placeholder is an object expression that evaluates to a PIUser object.

 

Remarks

Only valid server contexts may be assigned to this property. For the list of available contexts on the server, look at the Server.PIContexts collection. To add a new context to the server use PIContexts.Add.  For a discussion of the uses of contexts in an application see PIContext.

 

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 on the server.

pseUSERDATAFETCH

Unable to retrieve data for a particular user from the server.

pseNOEMPTYSTRINGS

Empty strings are not allowed for contexts.

pseUSERDATAUPDATE

Unable to update user data on the server. See the error description field for more information.

Enabling Operational Intelligence