Named query script

I am running a simple named query that adds an entry to the database.
However, I am finding that none of the scripts after the system.runNamedQuery command arent executing.

	system.db.runNamedQuery("NamedQuery", params)
	system.perspective.print("Added entry ")

I am printing a text to the console to confirm the script was executed.
Console didnt print anything but entry was added to the database.
Any reasons why this would happen?

  1. What version are you using?
  2. Did you check your Gateway to see if any errors were logged?
1 Like

Version 8.0.12

Here’s the error message from the gateway logs.

Error running Page/UI/ItemMaster@C/root/FlexContainer/TabContainer_0/FlexContainer/Table.onMessageReceived(self, payload): Traceback (most recent call last): File “function:onMessageReceived”, line 6, in onMessageReceived at com.inductiveautomation.ignition.gateway.db.namedquery.NamedQueryExecutor$NamedQueryInstance.execute( at com.inductiveautomation.ignition.gateway.db.namedquery.NamedQueryExecutor.execute( at com.inductiveautomation.ignition.gateway.db.namedquery.GatewayNamedQueryManager.execute( at com.inductiveautomation.ignition.common.db.namedquery.SecuredNamedQueryManager.execute( at com.inductiveautomation.ignition.gateway.script.GatewayDBUtilities.runNamedQuery( at jdk.internal.reflect.GeneratedMethodAccessor217.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: The statement did not return a result set.

I changed the query type and that fixed the issue