Accessing Server Automation from Visual Studio

To access Server Automation from Microsoft Visual Studio, follow these steps:

  1. In Microsoft Visual Studio, open the Project/Add Reference... dialog box.
  2. Select the COM tab.
  3. Scroll down the list and select Scx V6 Automation Interface.
  4. Click Ok to close the dialog box.
  5. In your program declare variables that represent the database connection and any objects in the database you need, for example:

    Dim Svr As ScxV6DBClient.ScxV6Server

    Dim Obj As ScxV6DBClient.ScxV6Object

  6. Create the server object and connect it to a server, for example:

    Svr = new ScxV6DBClient.ScxV6Server

    Svr.Connect("MAIN", "UserName", "Password")

  7. When your program has finished working with the database, use the Disconnect method to disconnect from the server:

    Svr.Disconnect()


Disclaimer

Geo SCADA Expert 2022