Manually Upgrading the Encompass SDK

If you have installed the Encompass SDK on a computer at your location, you will be required to upgrade the SDK to the correct version of Encompass with each Encompass server update. Because the EncompassObjects assembly is version- dependent, it will only work with the same version of the Encompass Server service. Until the SDK is upgraded (or uninstalled), your application will not be permitted to connect to the upgraded Encompass Server.

Updating Computers with the Encompass SDK Installed

The most frequent exception that developers will encounter to the three conditions required to be “SmartClient-enabled” is that they have installed the Encompass SDK on the computer. Certainly this is common on a machine intended for use as a development system, but it may also be the case when your application runs on a web server or other back-office system that has no need for a full Encompass SmartClient installation.

In these cases, you will need to be prepared to update the Encompass SDK whenever a server version change occurs. The Encompass SDK installation package includes a tool specifically designed to facilitate this process. The SDK Update Wizard allows you to detect the software version of your Encompass Server and then download and install the appropriate version of the Encompass SDK. You can launch the SDK Update Wizard from the Start Menu.

If you fail to upgrade your SDK when a server update occurs, your custom application will be unable to connect to the Encompass Server. Within your application code, this failure will appear as a VersionException that is raised when you invoke the Session.Start() method. If you are authoring software that will run in environments outside the developer’s control (e.g. software that is re-sold under the Encompass SDK Partner Agreement), it is a best practice to include code to catch this event and notify the user that their software version is incompatible.

For example, you can use the following code in a Windows Form-based C# application.

try

{

Session session = new Session(); Session.Start("remoteserver", "mary", "maryspwd");

...

}

catch (VersionException ex)

{

MessageBox.Show("The client is unable to connect to the Encompass Server because the Encompass software versions are incompatible. Please update your Encompass software using the SDK Update Wizard located in your Start\Encompass SDK menu.");

}