Hello,
I have a script that runs perfect from the Script Console. The code is this:
system.db.execSProcCall(system.db.createSProcCall("sp_test"))
Basically just calls a Stored Procedure in my MS SQL DB.
Now I want this same code to trigger when a tag from MQTT Engine changes. So in the Tag Editor, under Scripting I add the same code but it never executes. I get this error message:
Error executing script.
Traceback (most recent call last):
File "tagevent:valueChanged", line 2, in valueChanged
at com.inductiveautomation.ignition.common.script.builtin.AbstractDBUtilities.error(AbstractDBUtilities.java:392)
at com.inductiveautomation.ignition.common.script.builtin.AbstractDBUtilities.execSProcCall(AbstractDBUtilities.java:530)
at jdk.internal.reflect.GeneratedMethodAccessor177.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
java.lang.Exception: java.lang.Exception: Error executing system.db.execSProcCall()
Any idea why it works in the Script Console, but not for Tag Scripting?