Fields in the ALERTS table
The following table contains the fields of the ALERTS table that can be accessed through queries using SQL. The ALERTS table was created to simulate the alert panel. SQL query examples are described in the chapter Example queries.
Name | OLE DB type |
ABBR | DBTYPE_BSTR |
DPNAME | DBTYPE_BSTR |
STIME | DBTYPE_BSTR |
ALIAS | DBTYPE_BSTR |
DESCRIPTION | DBTYPE_BSTR |
UNIT | DBTYPE_BSTR |
FORMAT | DBTYPE_BSTR |
ACK_TIME | DBTYPE_BSTR |
ACK_STATE | DBTYPE_I4 |
ACK_TYPE | DBTYPE_I4 |
ACK_USER | DBTYPE_UI4 |
ACKABLE | DBTYPE_BOOL |
ALERT_COLOR | DBTYPE_BSTR |
ARCHIVE | DBTYPE_BOOL |
COMMENT | DBTYPE_BSTR |
DEST | DBTYPE_I4 |
DEST_TEXT | DBTYPE_BSTR |
DIRECTION | DBTYPE_BOOL |
INACT_ACK | DBTYPE_BOOL |
LAST | DBTYPE_BOOL |
LAST_OF_ALL | DBTYPE_BOOL |
OBSOLETE | DBTYPE_BOOL |
OLDEST_ACK | DBTYPE_BOOL |
PANEL | DBTYPE_BSTR |
PARTN_IDX | DBTYPE_I4 |
PARTNER | DBTYPE_BSTR |
PRIOR | DBTYPE_I1 |
SINGLE_ACK | DBTYPE_BOOL |
TEXT | DBTYPE_BSTR |
VALUE | DBTYPE_VARIANT |
VISIBLE | DBTYPE_BOOL |
The PRIOR column is presented as an INTEGER in OLE DB and not as CHAR as in WinCC OA SQL.
In addition to the values presented above, there are 3 columns that can be used in the WHERE condition in order to restrict the query:
Name | OLE DB type |
ELEMENTTYPE | DBTYPE_BSTR |
DPTYPE | DBTYPE_BSTR |
ISLEAF | DBTYPE_BSTR |
ISLEAF requires, contrary to WinCC OA SQL, a boolean comparison. This means that WHERE _LEAF becomes WHERE ISLEAF = TRUE in OLE DB SQL.