ODBC format databases
Tag table (optional)
Stores tag names in an index so they can be referenced by using a 2- or 4-byte numeric field (rather than a 40-byte character field) in the float and string tables.
Float table
Stores analog and digital values.
String table (optional)
Stores string values.
Structure
The structure of the ODBC data tables is as follows:
Table | Field Name | Description | SQL Data Type | Length (Bytes) |
---|---|---|---|---|
Tag table | TagName | Tag name | SQL_VARCHAR or
SQL_CHAR | 250 |
TagIndex | Tag index (the foreign key into the Float and String tables) | SQL_SMALLINT or SQL_INTEGER | 2 or 4 | |
TagType | Type of tag (2- analog, 3 - digital, 4 -string) | SQL_SMALLINT | 2 | |
TagDataType | Type of data (0 - long, 1 - float, 2 - string) | SQL_SMALLINT | 2 | |
Float table | DateAndTime | Time and date data was logged. | SQL_DATETIME | Driver dependent |
Millitm | Millisecond time when data logged.
For ODBC format this field is required. | SQL_SMALLINT or
SQL_INTEGER | 4 | |
TagIndex
or
TagName | Tag index corresponding to Tag table entry
or
Tag name if Tag table not defined (same as TagName in Tag table) | SQL_SMALLINT or SQL_INTEGER
or
SQL_VARCHAR or SQL_CHAR | 2 or
4
or
40 | |
Val | Value of logged data. | SQL_DOUBLE or
SQL_INTEGER or
SQL_SMALLINT | 8 or
4 or
2 | |
Status | Status of tag when value logged (blank - no error, E - communication error, D - disabled, U - uninitialized, S - stale data). | SQL_VARCHAR or
SQL_CHAR | 1 | |
Marker | Internal tag marker | SQL_VARCHAR or SQL_CHAR | ||
String table | same as Float table except for Val | |||
Val | Value of logged data | SQL_VARCHAR or SQL_CHAR | 82 |
Provide Feedback