Data in a table from Database

Hello community,

I'm working on a project in Perspective, and I'm having trouble loading data into a table from a database query. I currently have the Query created, but when I call it from the Data section of the Table, it returns an Error Configuration message.
Does anyone have any idea why this is happening or how to solve it?

Can you attach a screenshot of what you're doing? Is the database connection valid (e.g. are you able to run the same query from Tools -> Database Query Browser)?

Of course! The database connection is valid. I was able to run the same query from Tools -> Database Query Browser, and it returned correct values. The issue arises when trying to assign those values to the rows and columns of the table.



image

Hover over 'Error Configuration' and see the tooltip.

Also, show us your script transform and any other transforms you have.

Thanks! This is the script I use in the transformation:

You forgot to report on the Query Error_Configuration tooltip. What does it say?

It's going to be line 3. system.db() doesn't need to be instantiated like a class. It's a static namespace. If you really want to save typing system. repeatedly, you can change line 3 to just db = system.db. I would recommend against it, though. Community style has pretty much settled on not doing that, so it'll be confusing for anyone else used to Ignition who is reading your code in months or years.