Features, discussions, tips, tricks, questions, problems and feedback

Historical Alarm Viewer Exception

I’ve created a HistoricalAlarmViewer on one page in project, following the example on your site (MAPS - How to create historical Alarms in SQL using Alarm Management Agent (requires MAPS 3.4.x)). It works all right but sometimes the exception window appears - see

(view refresh period 1 minute, the database server installed on local host pc - same as maps server).
What should I do to prevent the exception?

Is it possible that there is so much data query times out? To are there network instability which can make sql to not respond?
The error message seems to point at that (could be also that after 1 minute there were no new alarms to add to the stack).

You might also want to try second generation of historical alarm viewer -> AdvancedAlarmViewer - a custom control for current and historical alarm display

Hi, thank you for the quick response!

  1. I’d like to stay with old school (classic HistoricalAlarmViewer).
  2. What kind of interaction between HistoricalAlarmViewer - maps client - maps server - dbms server? I mean sql requests for the data : I have 5 clients and 2 redundand servers (primary + standby), it is theoretically possible simultaneous requests from 5 alarm pages, but are they requests for the data to maps server or direct to dbms server. May be increasing refresh time will take me to the point? There is another db connection in the project to the same dbms server instance but to another database - designed for recipes and analog values & counters log. It is designed for unfrequently logs (triggered for every hour) and manual operator requests regarding to operations with recipes (less than 2 per hour)
  3. Should be there involved any specific configuration of AlarmManagement agent? I guess no… But?
  1. The clients are requesting data from maps server oledb datasource which then requests the data from sql. Since it’s 5 clients refreshing every minute, it can happen that all requests are sent at the same time if click is not synchronized. Increasing the refresh is a good start, you could also increase timeout on the datasource itself (right click-> edit datasource)
  2. If you don’t have Alarm management license, AMA agent should be in “enable historical mode”. Otherwise, it has to be configured as in help documentation about AMA agent.


I get the exact same error message but it happens every time i try ro refresh HistoricalAlarmViewer when there are alarm records present in database table.
The error doesn’t pop up only when the historical alarm database table is empty.

I’m on MAPS, I followed the same example on this site when creating historical alarms.
MAPS Server and SQL Server are installed on the same machine and nothing else connects to the database.

To confirm that there is actually data in the table, you can display the contents of the table in a DataGridView next to the Historical Alarm Viewer control:

  1. Drag a DataGridView onto the Form
  2. Use the “Bind Value” behaviour and choose the OleDB Data Source: HistoricalIncidents Table

If you go into run mode it should also display the records (if any) in the DataGridView

1 Like

I’ve solved the problem by installing another instance of SQL Server Express. Now I have 2 database engines installed and I use one for DbAccess agents and another for historical alarms - everything works fine this way.

1 Like