Solutions
...
Litmus Production Record Datab...
Interacting with Litmus Produc...
Inserting Multiple Production Record Item if not using Litmus Edge Integration
6 min
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 151,141,112,219,133,114 false true false unhandled content type unhandled content type unhandled content type unhandled content type false unhandled content type unhandled content type unhandled content type unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type unhandled content type unhandled content type unhandled content type false unhandled content type unhandled content type unhandled content type unhandled content type false unhandled content type unhandled content type unhandled content type unhandled content type false unhandled content type unhandled content type unhandled content type unhandled content type how to use to insert multiple values for production record item(s), 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|testarea,level1name,level2name,level3name|testarea,level1name,level2name ', @registerid = n' identifieritem1,identifieritem2|identifieritem1,identifieritem2,identifieritem3|identifieritem1,identifieritem2 ', @tagname = n' eventitem1|eventitem2| identifieritem1 ', @datatype = n' 1,100|asset1,shift1,line2|1,100 ', @value = n' 12|shutdown|1 ', @success = n' 1|1|0 '; 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 199,218,112,219,133,114 false true false unhandled content type unhandled content type unhandled content type false unhandled content type unhandled content type unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type unhandled content type unhandled content type