Configuration 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. The table is created with the following SQL command:
/* ValueType = "Double"*/ CREATE TABLE myTable( ID bigint IDENTITY(1,1) NOT NULL, Timestamp datetime NOT NULL, Name ntext NOT NULL, Value float NOT NULL ) /*ValueType = "Bytes"*/ CREATE TABLE myTable( ID bigint IDENTITY(1,1) NOT NULL, Timestamp datetime NOT NULL, Name ntext NOT NULL, Value image NOT NULL ) Important! Do not save the database on the Compact Flash Card in case of an embedded system. Either use the database in RAM, i.e. do not save to the "Hard disk" folder, or save on a network folder. To many write cycles to the Compact Flash Card can shorten its service life. 6.5.5 ODBC - MySQL Database The values of the variables are saved in a MySQL database.
The variable values are saved in the following table structure. TS6420 41 Version:
1.2 E DBColumnTypes _ MS Compact SQL PLC Control eDBColumn BigInt _ bigint T ULARGE INTEGER _ _ (TcUtilities.lib) eDBColumn Integer _ integer DINT eDBColumn SmallInt _ smallint INT eDBColumn TinyInt _ tinyint SINT eDBColumn Bit _ bit BYTE eDBColumn Money _ money LREAL eDBColumn Float _ float LREAL eDBColumn Real _ real REAL eDBColumn DateTime _ datetime DT eDBColumn NText _ ntext STRING eDBColumn NChar _ nchar STRING eDBColumn Image _ image ARRAY OF BYTE eDBColumn NVarChar _ nvarchar STRING eDBColumn Binary _ binary ARRAY OF BYTE eDBColumn VarBinary _ varbinary ARRAY OF BYTE Column name Data type Null permitted Characteristic ID INTEGER no IDENTITY(1,1) Timestamp DATETIME no Name VARCHAR(50) no ValueType="Double" Value DOUBLE no ValueType="Bytes"