Description

The SQL Query binding is a polling binding type that will run a SQL Query against any of the database connections configured in the Gateway.

Video recorded using: Ignition 7.7

Transcript

(open in window)

[00:00] The SQL Query Binding is a polling binding type that will run a SQL query against any other database connections configured in the ignition gateway. You can bind any property to a SQL query to retrieve data from a database. So here I have a table. I can bind the data property of the table to SQL query. You do have to know the SQL language in order to use this binding type. If you don't know the language, you can use a DB Browse binding that helps you build the SQL query. Otherwise, you type in the query directly into this field. In the right-hand side, you can bring in any property value from the screen, as well as, you can bring any tag value into the query making it dynamic. So here's an example query. I'm going to select the first name, the last name, and the email from our customer table, and I'm going to order it by the first name in ascending order. At the bottom, you specify which database connection you want to run this query through. If you leave this blank, Ignition will choose the default connections attached to this project. There's a project property for that. Otherwise, you can specify the connection directly. So here all of my data is in the Data, Database Connection. At the very bottom you have Polling Mode, which is how often you want this query to run.

[01:06] We're going to look at this one in another lesson. Once you have the query in there, you press OK, you should see your data come back in the table.

You are editing this transcript.

Make any corrections to improve this transcript. We'll review any changes before posting them.