DMSII Times

The DATABridge Client supports several DMSII ALPHA, NUMBER, or TIME encoding methods for time of day and elapsed time.

Choosing the SQL Data Type of the Relational Database Column

Except in the case of SQL Server 2008, the relational database column—regardless of the original DMSII time structure—has a default sql_type of 13, which is a Microsoft SQL Server int or Oracle number(6), except ticks, which is number(10). TIME(12) and TIME(14) are formatted as ddddhhmnss, where dddd is the number of days. All other TIME types are formatted as hhmnss. To make the client map a DMS item to a column that is a numeric date, you need to set the bit DIOPT_Clone_as_Time (256) in the di_options column of the corresponding DMS_ITEMS entry using the user script script.user_layout.dataset.

In the case of SQL Server 2008, which has a time data type, the client can store these values using the time data type. You can do this by setting the di_options bit DIOPT_Use_Time (131072) in the corresponding entry in the DMSII_ITEMS table using the script.user_layout.dataset user script. If you set both the DIOPT_Clone_as_Time bit and the DIOPT_Use_Time bit, the latter takes precedence.