We are using a system.db.runPrepQuery in a UDT and are getting the following error when our tag event is being fired:
com.inductiveautomation.ignition.common.script.JythonExecException: java.lang.Exception: java.lang.Exception: Error executing system.db.runPrepQuery( select top 1 DowntimeOngoingId ,MachineName ,SCWStatus ,FirstName ,LastName ,EmployeeId from [downtime_ongoing] where MachineName = ? and SCWStatus is not null and ClosedAt is null , , [ZZTest], )
Caused by: java.lang.IllegalArgumentException: Cannot find database connection - name cannot be null.
From what we understand, if you exclude the database argument it should use the project default as stated in the documentation:
String database - The name of the database connection to execute against. If omitted or "", the project's default database connection will be used. [optional]
Is this not the case when using system.db.runPrepQuery in a UDT or are we hitting a bug?