Connection to Citect Alarm Server Database from third-party application

Hello,

 

I am coding a third-party application to connect to Citect Alarm Server Database (Citect version 2018 R2 Update 12).  Using ODBCConnection.

Managed to overcome some initial teething problems about security and View Areas on the Role and User configuration and was able to return alarm records from the Alarm Server for records with Alarm Area and no Alarm Area assigned when executing SQL Select statement to the alarm tables

The following is an example of the code

ConnectionString = DRIVER={Citect Alarm Driver}; Server=AlarmServer; uid=User; pwd=xxxx; SystemsXml=D:\Alarm2SQL\Systems.Alarm.CLUSTER1.AlmServer.xml

Where the XML file contains information of the Alarm server and port 5482

Private ODBCConnection _connection;

_connection = new ODBCConnection(ConnectionString);

_connection.Open();

Subsequence query with SELECT * FROM CIDigitalalarm where RecordTime > yyyy-MM-dd HH:mm:ss would return alarm records as expected.

 

This is working fine when Runtime Manager is run as a standard process

When the Runtime Manager is run as a service, The ODBCConnection still return successfully with the login. But when querying the alarm, there is no alarm record returned.

When runtime manager is run as a service there is no Client Session and there is not a user to be logged in which causes the alarm area filtering issue?

Would really appreciate if someone could shed some light on how to address this problem when Citect is run as a service

Thank you