ODBC - DB2 Database
The values of the variables are saved in a DB2 Database.
The variable values are saved in the following table structure.
Column name | Data type | Null permitted | Characteristic |
---|---|---|---|
ID | BIGINT | no | IDENTITY (1,1) |
Timestamp | TIMESTAMP | no |
|
Name | VARCHAR | no |
|
ValueType="Double" | |||
Value | DOUBLE | no |
|
ValueType="Bytes" | |||
Value | BLOB | no |
|
An AutoID is generated in the "ID" column. The value in this column is, in other words, always increased by 1. This functionality makes the IDENTITY property possible.
The "Timestamp" column stores the time at which the data record was saved.
The name of the variable is stored in the "Name" column.
The "Value" column stores the value of the variable.
E_DBColumnTypes | DB2 | PLC Control |
---|---|---|
eDBColumn_BigInt | BIGINT | T_ULARGE_INTEGER (TcUtilities.lib) |
eDBColumn_Integer | INT | DINT |
eDBColumn_SmallInt | SMALLINT | INT |
eDBColumn_TinyInt | SMALLINT | INT |
eDBColumn_Bit | VARCHAR(1) | BYTE |
eDBColumn_Money | DECIMAL(18,4) | LREAL |
eDBColumn_Float | DOUBLE PRECISION | LREAL |
eDBColumn_Real | FLOAT | REAL |
eDBColumn_DateTime | TIMESTAMP | DT |
eDBColumn_NText | LONG VARCHAR | STRING |
eDBColumn_NChar | CHAR(254) | STRING |
eDBColumn_Image | BLOB | ARRAY OF BYTE |
eDBColumn_NVarChar | NVARCHAR(254) | STRING |
eDBColumn_Binary | BLOB | ARRAY OF BYTE |
eDBColumn_VarBinary | BLOB | ARRAY OF BYTE |