Sage 300 Trouble Installing Visual Basic 6.0 on Windows Server 2012/2016


The Sage 300 SDK, not Web SDK, requires Visual Basic 6.0 SP6 to be installed on the computer. But, what happens when that computer has Windows Server 2012/2016 and there are compatibility issues when attempting to install Visual Basic 6.0?

This article will show how to get Visual Basic 6.0 successfully installed.


While this solution might not work for all, it has worked for Sage 300 developers.

Simply uncheck the Data Access Components option during the installation:


That’s it!


If more information is required or if the actual steps needed to install Visual Basic 6.0 on Windows Server 2012/2016 (and even Windows 10) are required, please refer to the following links:


This article explained how to install Visual Basic 6.0 on Windows Server 2012/2016 by unchecking the Data Access Components option.

Reference links are provided if more information is required.

As a standard disclaimer, any topic in this article is subject to review and doesn’t represent a commitment as to when it will be available.


Sage 300 How to Return Super View Values from the Process Service


So, you are developing Web Screens for Sage 300 and you want to be able to check a field value or some field values that are returned from the super view. In the Sage 300 Desktop, which is based upon the Visual Basic 6.0 development environment, this is simple and straight-forward.

But, how is this done in the Web Screens where the process is handled by a Worker Role?

This article will explain how this is accomplished by looking at our Sage 300 Web Screen Payment Batch Unit of Work (UOW) service implementation as an example.

Process Flow

But, before we begin, let’s briefly review the Web and Worker Roles as they relate to a Process task.


The Sage 300 Web Architecture uses both web and worker roles to serve the functionality of the web screens. Worker roles are used for most long running processes, usually indicated by a progress-meter, and some reports.


The above diagram illustrates the flow once a process screen submits or starts the process.

Because the super view is handled and processed in the worker role, the business view (which is mapped to an MVC model) is not returned to the web role to access the required values.

Process UOW Service


The Process UOW Service is the class that invokes the Process Repository where the super view’s Process function is invoked and hydrates a model upon return from the function.

var model = repository.Process(seedEntity.Model);

But, this model is in the worker role and the model is not serialized back to the web role.

Process Result’s ResultObject

The ResultObject in the ProcessResult object will contain the value or values that you will want to return to the web role. But, you must place what you want in this object since we do not serialize the model into this object (hindsight says we should have!).

Prior to Sage 300 2019, the setting of the ResultObject was done by the developer by overriding the Process UOW’s OnExecute base class method. The following routine is from our 2018.2 implementation of the Payment Batch UOW class:


While overriding this base class method effectively was able to access and set the ResultObject, it also needlessly had to implement a lot of other code.

Sage 300 2019 eliminated the need to override the OnExecute base class method by providing an override method which provides the ability to set the ResultObject without re-implementing the base class method. The overridden OnExecute was deleted in the Payment Batch UOW class and replaced with an override to the GetResultObject method instead:


Back in the Web Role

At the completion of the process, control is returned to the screen’s JavaScript callback function onProcessComplete. If the ResultObject was set in the Process UOW Service’s override method GetResultObject, it is now available in this callback event:



This article explained how to return a super view value or values from a process service in the Sage 300 Web Screens.

As indicated in the XML Comments for the GetResultObject virtual method, since this is a single object and not an array or dictionary, if multiple values are required, use the pipe symbol as separator to concatenate multiple fields.

The GetResultObject is a virtual method that can be overridden in the Process UOW service class to return a value or values from the worker role to the web role.

The onProcessComplete JavaScript callback function is invoked at the completion of the process and the ProcessResult.ResultObject is available for the developer with any values that may have been set in the worker role. By default, the ResultObject is null.

So, not as simple as the desktop implementation, but still doable with a few extra steps!

As a standard disclaimer, any topic in this article is subject to review and doesn’t represent a commitment as to when it will be available.


Sage 300 Compiling Web Screens in Release Mode Tip


When developing Web Screens for Sage 300, a developer typically compiles and runs in Debug mode within the Visual Studio IDE.

Changing to Release mode and compiling the solution performs an additional step which is to deploy or copy the required assemblies and files to the developer’s local Sage 300 installation. This is beneficial for the developer to see the screens running via the Sage 300 homepage.

This deployment or copy is performed by the post-build event utility MergeISVProject.

But, the files may be locked by another process. This article will explain who has these files locked and the steps required to successfully compile in Release mode or manually copy files.

Why are my files locked?

Files are targeting the Web folders will be copied without issue, while the files in the Worker folder will most likely be held by our worker service. This service is responsible for managing the worker role for the Sage 300 Web Screens.

This is the reason that a compile in Release mode or a manual copy of files to the Worker folder may not be successful.


How do I unlock my files?

Stopping our worker service, compiling in Release mode or copying of files and then re-starting the worker service is the best and simplest way to resolve this issue.

Stop the Worker Service

Invoke the Services Desktop Application and scroll down to the Sage.CNA.WindowsService:


Double-Click the service and select Stop:


Compile in Release Mode or Manually Copy Files

When the developer solution is compiled in Release mode or files are manually copied, with the Sage.CNA.WindowsService stopped, the copy process will not run into a lock or contention scenario.

Re-start the Worker Service

To re-start the service, select Start:



This article explained why a compile in Release mode or a manual copy of files to the Worker folder for the Sage 300 Web Screens may run into a locked or contention scenario.

The copy process will not encounter an issue if the Sage.CNA.WindowsService is stopped.

And, don’t forget to re-start the service after the compile or copy is successful!

Finally, after any file is updated in either the Web or Worker folders it is always good practice to perform an IIS Reset of the Default Web Site.

As a standard disclaimer, any topic in this article is subject to review and doesn’t represent a commitment as to when it will be available.