Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagec#
	string remoteIP = "127.0.0.1";
	object server = null;
		DataAccess access = new DataAccess();
		 
		 server = access.SetServer(remoteIP, "Administrator", "");
		 if (server is string)
		 {
		 	@Info.Trace("OfficeServices::Connect - Error: " + server);
		 	access = null;
		 }

    bool sus = access.SetCurrentValue("Tag1", 123, 192, DateTime.UtcNow, server, 0, false);

where:

  • remoteIP can be substituted with the IP address of the remote computer, making it versatile and adaptable to different connections.
  • DataAccess instantiates a new object to access methods provided by this API, granting access to its functionalities.
  • access.SetServer establishes a connection to the associated project while utilizing the "Administrator" user. An empty password ("") signifies that no password authentication is required for this user.
  • access.SetCurrentValue assigns a value of 123 and quality of 192 to a designated "Tag1," which is typically a tag created within the client project.