Stephen Smith's Blog

All things Sage 300…

Diagnosing Problems Running Accpac Part 3

with 4 comments

In the first part of this series we looked in detail at what happens from double clicking on the Sage Accpac ERP icon through to seeing the signon dialog being displayed. In the second part we looked at the steps that happen from hitting ok on the signon dialog through to the desktop being running displaying the tree of icons. In this installment we will look into what happens when you double click on an application screen on the desktop.

Each application form is an ActiveX control ( Every ActiveX control needs to be registered. When you first double click on an icon we will use the a4wInstaller component to see if that control is registered and if not, register it. You can register all the screens ahead of time using the regacc.exe tool. If running web deployed (or a screen launched from SageCRM) it will first check to see if the control exists on the current computer and if it doesn’t it will download it. Once the control is registered, Accpac will run a copy of a4wContainerXP.exe to host this ActiveX screen control. ActiveX controls can’t run on their own, they must be hosted inside a COM Container like a4wContainerXP, Internet Explorer or Visual Basic. A4wContainerXP will use the mechanisms of COM to load the ActiveX screen and display it.

Now the screen will actually run. At this point it checks that a lanpak is being used and that this application is licensed; then opens a connection to the database and load any Views (Business Logic Objects) that it requires. It also creates all its screen controls (which are ActiveX controls themselves) and connects them to the Views. Each View is wrapped by a Data Source control which provided additional COM services for each Views (like events).

When diagnosing when a UI won’t start, there are three very powerful spying utilities included with Accpac. These include Accpac Spy which spies on everything that happens in the COM components, RVSpy which spies on the business logic layer and DBSpy which spies on the database layer. The User Interface form consists of a number of COM components that provide all the UI controls and services. These communicate with the Business Logic layer which communicates with the database layer. Below is a diagram of the 3 tier stack along with the Spy tools that spy on each layer.

Using Accpac Spy you can Spy on the various components as they initialize to see if anything goes wrong. The usual order to spy is as follows:

  • Container – Window that hosts the application screen (a4wContainerXP.exe)
  • Installer – Automatic registration of UI OCX (a4wInstaller.dll)
  • Session Management – Auto-creation of session if already signed on, etc.
  • Datasource controls – used by UI to access application views
  • Edit and list controls, finder, import/export – Advanced

Accpac Spy should be able to diagnose problems with the various COM and ActiveX controls that make up a User Interface form.

RVSpy records everything that happens at the Business Logic Layer:

  • Records operations on all application views, including 3rd party applications
  • Which record is read, field values retrieved, when update happens, etc.
  • Output is nested if one view calls another
  • Can include DBSpy output to show what database calls are made for a particular view call
  • Views are identified by View IDs
    • AP0015: APVEN
      • AP Vendors
    • First 2 characters are always the application prefix so you can determine if a view is Sage Accpac’s or a 3rd party application
  • Sage Accpac Application Object Models

DBSpy records everything that happens at the Database Layer. It is good for diagnosing problems with the database server. It records every error from the database and sometimes these don’t make it up to be displayed at the UI level.

All the preferences for things like grids, like the column order, column sizes and such are stored in the shareddatafolder\user\userid folder as orgid_p.ism. If a screen won’ start it is often worthwhile to rename this file to see if that helps (it will be re-created when you run Accpac). ScanIsam should find any structural problems with this file and possible fix them.

One common cause of problems with the UI COM components is having had multiple versions of System Manager installed at different locations on your hard disk. Often then the wrong component will be in the PATH or the wrong one will be referenced by the Window’s registry. If you have this case, its best to delete all the old copies of System Manager, clean up your PATH environment variable and re-run regacc.exe to make sure all the correct objects are registered. Similarly moving the programs between a file server and a local hard drive can cause the same sort of mismatches. Best is to only have one copy visible so you know you are running the correct files. You can also use Process Explorer from System Internals (now part of Microsoft) to select the a4wcontainerxp.exe process and check that all the DLLs it has loaded come from where you expect System Manager to be installed. If you do want to run multiple versions of Accpac, its far more trouble free to use Virtual images with products like VirtualPC or VMWare; these guarantee that the multiple versions won’t interfere with each other.

When you report problems to technical support, they will often request all these logs so they can isolate in the code where things are going wrong. Then they can diagnose the problem. Sometimes they will go to development, where hopefully the spy log has isolated where the problem is occurring so the programmer can look in the code and figure out what is going on. If the log doesn’t isolate things sufficiently, development can produce a “patch” DLL with additional logging to isolate the problem further. As a first step they will try to reproduce the problem in support and only pass on the “patch” DLL to the customer if they can’t reproduce the problem in support.

This concludes this installment of diagnosing problems, next week we’ll look at problems running Crystal Reports.

Written by smist08

April 24, 2010 at 7:55 pm

Posted in sage 300

Tagged with , ,

4 Responses

Subscribe to comments with RSS.

  1. I thought orgid_p.ism stored the user’s printer info and orgid_c.ism stored the customizations. If orgid_p.ism stores colums, etc, what does orgid_c.ism store?


    April 28, 2010 at 6:46 am

  2. orgid_p.ism stores a number of user preferences including printer info and grid layouts. Basically anything a user form want remembered that doesn’t go in the database. ordid_c.ism stores customizations made to the Accpac destkop like new icons or groups that have been added.


    April 28, 2010 at 8:50 pm

  3. […] at this step then check out these blog postings on diagnosing problems in Accpac part 1, part 2, part 3 and part […]

  4. […] on troubleshooting, check out these blog postings on diagnosing problems: part 1, part 2, part 3 and part […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: