Hi, I have an issue when I make a update query from ignition. I’ve checked the table and the change is realized, but always I get the following error:
12:29:56.712 [UpdateExecuter 2] ERROR com.inductiveautomation.factorypmi.application.gateway.QueryManager - Error running update query:
""@-1ms
On: aceitado2.Root Container.tb_calibres.data
com.inductiveautomation.ignition.client.gateway_interface.GatewayException: SQL error for “”: Query missing.
The query is:
tabla = event.source
datos = event.source.data
fila = event.source.selectedRow
if fila >= 0:
columna = event.source.selectedColumn
columnas = system.dataset.getColumnHeaders(datos)
ndx = datos.getValueAt(fila,'NDX')
parametro = columnas[columna]
valor = datos.getValueAt(fila,parametro)
query = "UPDATE PARAMETROS_LINEA_ACEITADO SET %s = %s WHERE NDX = %d" % (parametro,valor,ndx)
txID = system.db.beginTransaction(database = "main",timeout = 5000)
system.db.runUpdateQuery(query,"main",txID)
system.db.commitTransaction(txID)
system.db.closeTransaction(txID)
system.db.refresh(tabla,'data')
I put some print between the system.db.runUpdate and system.db.commitTransaction, but the error is printed after the system.db.refresh(tabla,‘data’). So, I created a button that execute the last line, but there is no error when I clicked.
What would be the problem?