My Perspective table’s onEditCellCommit script contains the line
system.db.runPrepUpdate(
"UPDATE passwords SET %s = ? WHERE (area = ? AND location = ? AND system_name = ?)" % (c),
[v, a, l, s], dbConn
)
which generates the following console error when I try to edit the system_name
column.
20:12:07.608 [AWT-EventQueue-0] ERROR com.inductiveautomation.ignition.client.util.gui.ErrorUtil - Error running action 'component.onEditCellCommit' on subViews/viewPasswordsOriginal@D/root/Table: Traceback (most recent call last):
File "<function:runAction>", line 26, in runAction
at com.inductiveautomation.ignition.common.script.builtin.AbstractDBUtilities.error(AbstractDBUtilities.java:362)
at com.inductiveautomation.ignition.common.script.builtin.AbstractDBUtilities.runPrepUpdate(AbstractDBUtilities.java:258)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.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.runPrepUpdate(
UPDATE passwords SET system_name = ?
WHERE (area = ? AND location = ? AND system_name = ?),
[King 5818 test2, CC, Cleanroom 1, King 5818 test1],
engpasswords, , false, false)
(Code and error lines have been wrapped to improve readability.)
The variables all seem to be set correctly in the error message. Can anyone see what might by triggering the error?