1. The Connection Object


The Connection object has the following public methods:

 

  1. Login Method

The Login method logs into the specified PI Server using the specified PI user name and password. If the attempt fails, the PI-Login dialog is presented to allow the user to enter a new user name and password. If a connection is made, it returns a reference to a PI Server object for the connected server.

The PI-Login dialog looks like.

 

WHEN TO USE THE LOGIN METHOD

Most programmers will want to use the PISDKDlg.Connections.Login method instead of the Open method of the Server object to connect to a server because the PISDKDlg.Connections.Login displays the PI-Login dialog if the user account is password protected and the password is not passed as a parameter to the method. If you use the lower-level Server.Open method instead, the method will simply raise an error if the user account is password protected and the password is not passed as a parameter to the method.

Enabling Operational Intelligence