[BUG-16264] runQuery doesn't work in calculated roster?

It appears that runQuery doesn’t work in a Calculated Roster script. If I comment out the line, the script runs and I get a roster. When remove the comment and cause an alarm to occur, it looks like it fails and then the script cannot return a roster.

The script is:
ig_calcroster_sqlerror_script

The error I get in the logger is:

In the script console, it runs fine and returns a dataset:

What is going on? I want to be able to create an SQL string and run a query to build a roster. Can I not do this?

Have you tried specifying the datasource in your runQuery call?

I guess that is the answer because it worked, but why? runQuery should use the default database when not specified. The default database is set correctly

Your intuition is correct, it should work that way. That it doesn’t seems like a bug in 8.0. They are executing in the context of the gateway ScriptManager instead of the project ScriptManager

In 7.9, though, you would have needed so specify the datasource regardless, because these would have been “global” resources, and I don’t think there was a default database for globally scoped resources.

This issue is fixed in 8.0.14.

Thanks!