AddServer
- Last UpdatedNov 17, 2021
- 1 minute read
The AddServer method adds a server to the list.
Syntax
[Result=] aaHistClientSingleValueEntry.AddServer(message serverName, message loginName, message password, [discrete bPersistPassword]);
Parameters
serverName
The name of the server to connect.
loginName
A valid user name for the server.
password
A valid password for the server.
bPersistPassword
Optional parameter. If set to True, the password is remembered for the subsequent connection attempts. The password is only remembered for single application; the persisted password is not available to all applications. The default value is True.
Return Value
Returns True if the server can be added to the list; otherwise returns False.
Remarks
Important: A user must have administrative privileges for the AVEVA Historian to insert data for a tag.
-
If the server is already a part of the servers collection for the control and the provided log on information matches with the information already available with the server, the control switches to the new server. If the provided log on information does not match, the server is logged off and logged again with the new login credentials.
-
This method does not actually attempt to connect to the server. The connection occurs when tags are added.