If you want to create a watchdog using the Scheduler, to monitor the status of the Alarm ODBC connection, use the following custom code in your Timer entry. For each case, substitute [...] with the actual action you want to take:
Private Declare Function GetAlarmODBCStatus Lib "MissionVBA.dll" () As Integer
Private Sub FixTimer3_OnTimeOut(ByVal lTimerId As Long)
Dim IntODBCstatus As Integer
IntODBCstatus = GetAlarmODBCStatus
Select Case IntODBCstatus
Case 0
' connecting
[..]
Case 1
' not connected
[..]
Case 2
' connected
[..]
Case 3
'connection lost
[..]
End Select
End Sub
It is recommended that you run your Time-based entry at an interval of 20 seconds in order to get accurate data, since the time-out for the SQL connection is about 60 seconds.
Unlike the Tag field in the Lost Connections area of iFIX ODBC Alarm Service Configuration dialog box, this example allows you to create a watchdog to monitor the status and report back on it.