Fields in the HISTVAL table

The following table contains the fields of the HISTVAL table that can be accessed in a query using SQL.

Name OLE DB type
DPSYSTEM DBTYPE_I1
DPID DBTYPE_UI4
DPEL DBTYPE_I2
DPTYPEID DBTYPE_I2
DPTYPE DBTYPE_BSTR
DPNAME DBTYPE_BSTR
STIME DBTYPE_BSTR *)
DESCRIPTION DBTYPE_BSTR
ALIAS DBTYPE_BSTR
FORMAT DBTYPE_BSTR
UNIT DBTYPE_BSTR
ORIGINALVALUE VARIANT **)
ONLINEVALUE VARIANT
OFFLINEVALUE VARIANT
DEFAULTVALUE VARIANT
CORRECTIONVALUE VARIANT
STATUSBITS DBTYPE_UI4 ***)
ACTIVE_BIT DBTYPE_BOOL
EXP_DEFAULT_BIT DBTYPE_BOOL
AUTDEFAULT_BIT DBTYPE_BOOL
DEFAULT_BIT DBTYPE_BOOL
OUT_PRANGE_BIT DBTYPE_BOOL
OUT_RANGE_BIT DBTYPE_BOOL
EXP_INV_BIT DBTYPE_BOOL
AUT_INV_BIT DBTYPE_BOOL
INVALID_BIT DBTYPE_BOOL
BAD_BIT DBTYPE_BOOL
DEFAULT_BAD_BIT DBTYPE_BOOL
ONLINE_BAD_BIT DBTYPE_BOOL
OFFLINE_BAD_BIT DBTYPE_BOOL
FROM_GI_BIT DBTYPE_BOOL
FROM_SI_BIT DBTYPE_BOOL
PER_ACTIVE_BIT DBTYPE_BOOL
CORR_BIT DBTYPE_BOOL
COMPR_BIT DBTYPE_BOOL
COMP_CORR_BIT DBTYPE_BOOL
CORR_ADD_BIT DBTYPE_BOOL
COMP_INV_BIT DBTYPE_BOOL
STIME_INV_BIT DBTYPE_BOOL
USERBIT1_BIT DBTYPE_BOOL
USERBIT2_BIT DBTYPE_BOOL
USERBIT3_BIT DBTYPE_BOOL
USERBIT4_BIT DBTYPE_BOOL
USERBIT5_BIT DBTYPE_BOOL
USERBIT6_BIT DBTYPE_BOOL
USERBIT7_BIT DBTYPE_BOOL
USERBIT8_BIT DBTYPE_BOOL
USER DBTYPE_UI2
MANAGER DBTYPE_UI2
EVENTTYPE DBTYPE_UI2
ARCHIVENUMBER DBTYPE_UI2

*): In order to not to forfeit the millisecond accuracy, all WinCC OA TimeVar types are converted to DBTYPE_BSTR in the defined default time format and also passed to the querying application in this format.

**): The Variant data type in OLE DB can take any data type from WinCC OA (for example, float, int, bool, string and others). The page Data types for OLE DB provider contains information on the conversion of WinCC OA data types into OLE DB data types.

***): Since the querying application would display an unsigned integer as a number, the status bits are converted into a BSTR and also passed in this format. This contains a bit string of 32 characters (each 0 or 1).

Since the Variant type is limited to an accuracy of seconds for time data, time information held in original value, online value and others is automatically converted into text in the standardized time format and subsequently always processed and displayed as text.

Status bits are also converted into a text representing the bit pattern.