Hi All,
I am having the following issues running the following script on a push button;
Traceback (most recent call last):
File “event:actionPerformed”, line 10, in
java.lang.Exception: java.lang.Exception: Error executing system.db.runUpdateQuery(INSERT INTO BatchInformation (BatchID, LeakDecay, Station4, Plugs, Pins, ElectricalTest) VALUES ( ?, ?, ?, ?, ?, ?), [[190010, Good, Fri Apr 12 07:22:32 BST 2019], [1, Good, Fri Apr 12 08:15:40 BST 2019], [0.0, Good, Fri Apr 12 06:58:51 BST 2019], [0, Good, Fri Apr 12 06:58:51 BST 2019], [2, Good, Fri Apr 12 08:15:40 BST 2019], [16, Good, Fri Apr 12 06:58:51 BST 2019]], SQLServer_WinAuth, false)
caused by Exception: Error executing system.db.runUpdateQuery(INSERT INTO BatchInformation (BatchID, LeakDecay, Station4, Plugs, Pins, ElectricalTest) VALUES ( ?, ?, ?, ?, ?, ?), [[190010, Good, Fri Apr 12 07:22:32 BST 2019], [1, Good, Fri Apr 12 08:15:40 BST 2019], [0.0, Good, Fri Apr 12 06:58:51 BST 2019], [0, Good, Fri Apr 12 06:58:51 BST 2019], [2, Good, Fri Apr 12 08:15:40 BST 2019], [16, Good, Fri Apr 12 06:58:51 BST 2019]], SQLServer_WinAuth, false)
caused by GatewayException: Connection Error: Transaction "SQLServer_WinAuth" is closed.
caused by SQLException: Transaction "SQLServer_WinAuth" is closed.
Ignition v8.0.0 (b2019040718)
Java: Azul Systems, Inc. 11.0.2
My script is as follows;
Batch_ID_Val = system.tag.read("[default]BatchID 1/BatchID.Value")
Leak_Decay_Val = system.tag.read("[default]Leak Test/Leak Test Total.value")
Station_4_Val = system.tag.read("[default]Station 4/Station 4 Bad.value")
Plugs_Val = system.tag.read("[default]Plugs/Plugs Total.value")
Pins_Val = system.tag.read("[default]Pins/Pins Bad.value")
Electrical_Test_Val =system.tag.read("[default]Station Fails/St17.value")
dbconnection = “SQLServer_WinAuth”
system.db.runUpdateQuery(“INSERT INTO BatchInformation (BatchID, LeakDecay, Station4, Plugs, Pins, ElectricalTest) VALUES ( ?, ?, ?, ?, ?, ?)”,[Batch_ID_Val, Leak_Decay_Val, Station_4_Val, Plugs_Val, Pins_Val, Electrical_Test_Val], dbconnection)
Any help would be appreciated,
Thanks