Accessing Server Automation from VB.NET
To access Server Automation from Microsoft Visual Studio 2005, follow these steps:
- Within Microsoft Visual Studio 2005 open the Project/Add Reference... dialogue.
- Select the COM tab.
- Scroll down the list and select Scx V6 Automation Interface.
- Click Ok to close the dialogue.
- 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
- Create the server object and connect it to a server, for example:
Svr = new ScxV6DBClient.ScxV6Server
Svr.Connect("MAIN", "UserName", "Password")
- When your program has finished working with the database, use the Disconnect method to disconnect from the server:
Svr.Disconnect()