Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

PIServer.Connect Method

  • Last UpdatedNov 18, 2025
  • 4 minute read
PIServer.Connect Method
Open a connection to the PI Data Archive to allow sending and retrieving data.
Open a connection to the PI Data Archive using the specified connection preference to allow sending and retrieving data.

Overload List

  NameDescription
Public methodCode example
Connect(Boolean)
Open a connection to the PI Data Archive using default credentials to allow sending and retrieving data.
Public methodCode example
Connect(NetworkCredential)
Open a connection to the PI Data Archive using the specified PI User credentials to allow sending and retrieving data.
Public method
Connect(String)
Connects to the server using the specified Access Token to allow sending and retrieving data.
Public methodCode example
Connect(AFConnectionPreference)
Open a connection to the PI Data Archive using the specified connection preference to allow sending and retrieving data.
Public methodCode example
Connect(Boolean, IWin32Window)
Open a connection to the PI Data Archive with a credential prompt if necessary to allow sending and retrieving data.
Public methodCode example
Connect(NetworkCredential, AFConnectionPreference)
Open a connection to the PI Data Archive using the specified PI User credentials and connection preference to allow sending and retrieving data.
Public methodCode example
Connect(NetworkCredential, PIAuthenticationMode)
Open a connection to the PI Data Archive using the specified credentials to allow sending and retrieving data.
Public method
Connect(String, AFConnectionPreference)
Connects to the server using the specified Access Token to allow sending and retrieving data.
Public method
Connect(String, String)
Connects to the server using the specified credentials to allow sending and retrieving data.
Public methodCode example
Connect(Boolean, IWin32Window, AFConnectionPreference)
Open a connection to the PI Data Archive using the specified connection preference with a credential prompt if necessary to allow sending and retrieving data.
Public methodCode example
Connect(NetworkCredential, AFConnectionPreference, PIAuthenticationMode)
Open a connection to the PI Data Archive using the specified credentials and connection preference to allow sending and retrieving data.
Public method
Connect(String, String, AFConnectionPreference)
Connects to the server using the specified credentials to allow sending and retrieving data.
Public methodCode example
Connect(Boolean, IWin32Window, AFConnectionPreference, Boolean)
Open a connection to the PI Data Archive using the specified connection preference with a credential prompt if necessary to allow sending and retrieving data and return an indication that dialog was canceled.

See Also

TitleResults for “How to create a CRG?”Also Available in