Solutions
...
Litmus Production Record Datab...
Interacting with Litmus Produc...
Inserting Single Tag Item if not using Litmus Edge Integration
6min
use cases litmus production record database allows for several ways to insert data into its tables the recommended way when using litmus edge, is to make use of the mssql integrations to insert data directly into the table prorec misc transactions as it allows to make use of the integrated store and forward capability, preventing data loss on a connection interruption but for cases, where this is not an option, a stored procedure can be called by a program or code snippet to insert data data any application which provided the capability to use an odbc connection can be used like python c# net excel go java method execute stored procedure prorec misc writeintotransactiontables input variables variable name datatype description example @deviceid varchar(8000) the name of the device associated with the tag asset1 @registerid varchar(8000) the name of the tag temperature @tagname varchar(8000) the data item for the tag value @datatype varchar(8000) the timestamp in unix millisecond format enclosed by "##" > this is also used to distinguish between a production record item and a tag ##1678279064681## @value varchar(8000) the value for the data item 45 @success varchar(8000) the quality of the tag (1 = good, 0 = bad) 1 how to use to insert a single value for a tag item, call the stored procedure prorec misc writeintotransactiontables using the t sql exec or execute keyword and provide the input variables below is an example using t sql in sql server management studio exec \[le productionrecord] \[dbo] \[prorec misc writeintotransactiontables] @deviceid = n'asset1', @registerid = n'temperature', @tagname = n'value', @datatype = n'##1678279064681##', @value = n'45', @success = n'1'; result the stored procedure will verify that the provided values are correctly formatted and then write them into the table prorec prorec transactions this will trigger their immediate processing the result can be read back from the log table prorec prorec log below is an example using t sql in sql server management studio select top (100) \[logid] ,\[logtype] ,\[logprocedure] ,\[logentry] ,\[logtime] from \[le productionrecord] \[dbo] \[prorec tag log] order by logid desc; with the result returned messages returned by the stored procedure message meaning example which triggers one or more parameters are null, please provide the correct values for each parameter one or more of the input variables have no value provided exec \[le productionrecord] \[dbo] \[prorec misc writeintotransactiontables] invalid value for deviceid the value is either the devicename for tags or a comma separated list of the node and optional levelnames for the input variable @deviceid a unique identifier such as "07045de1 5ac1 4e12 b8f5 608efc9c23c2" was provided exec \[le productionrecord] \[dbo] \[prorec misc writeintotransactiontables] @deviceid = n'07045de1 5ac1 4e12 b8f5 608efc9c23c2', @registerid = n'temperature', @tagname = n'value, @datatype = n'##1678279064681##', @value = n'45', @success = n'1' invalid value for registerid the value is either the tagname for tags or a comma separated list of the identifiers for the input variable @registerid a unique identifier such as "07045de1 5ac1 4e12 b8f5 608efc9c23c2" was provided exec \[le productionrecord] \[dbo] \[prorec misc writeintotransactiontables] @deviceid = n'asset1', @registerid = n'07045de1 5ac1 4e12 b8f5 608efc9c23c2', @tagname = n'value', @datatype = n'##1678279064681##', @value = n'45', @success = n'1'