Solutions
...
Litmus Production Record Datab...
Interacting with Litmus Produc...
Inserting Single Production Record 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) comma separated list consisting of node name and optional level names testarea,level1name,level2name @registerid varchar(8000) comma separated list of identifier item names identifieritem1,identifieritem2 @tagname varchar(8000) item name eventitem @datatype varchar(8000) comma separated list of values for the identifiers provided in @registerid 1,100 @value varchar(8000) the value for the item specified by @tagname 12 @success varchar(8000) is the item an identifier? (1 = no, 0 = yes) 1 how to use to insert a single production record item value, 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'testarea,level1name,level2name', @registerid = n'identifieritem1,identifieritem2', @tagname = n'eventitem', @datatype = n'1,100', @value = n'12', @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 prorec 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 device name for tags or a comma separated list of the node and optional level names 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'identifieritem1,identifieritem2', @tagname = n'eventitem', @datatype = n'1,100', @value = n'12', @success = n'1' invalid value for registerid the value is either the tag name 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'testarea,level1name,level2name', @registerid = n'07045de1 5ac1 4e12 b8f5 608efc9c23c2', @tagname = n'eventitem', @datatype = n'1,100', @value = n'12', @success = n'1'