OpenSqlList Function

Introduction

Opens a new query on the tag database.

Informal Syntax:

OpenSqlList( Title, AutoUpdate, SQL )

Formal Syntax:

OpenSqlList( Title:=Expression, AutoUpdate:=Expression, SQL:=Expression )

Parameters

ParameterTypeDescription
TitleANY_STRINGThe title of the SQL list.
AutoUpdate BOOL Whether the list automatically refreshes. Use TRUE to turn on automatic refresh. Use FALSE to turn off automatic refresh.
SQL ANY_STRING The SQL SELECT Query to display in the list. See SQL Language for the syntax of this parameter.

The OpenSqlList function executes the specified SQL query and displays the results in a table. The exact behaviour varies according to the context:

A program or script will not execute any statements after the OpenSQLList call.

Return value

None.

Examples

Displays a list of all digital tags:

OpenSqlList( "Digital Tags", TRUE, "SELECT FullName,DisplayValue FROM TagDigital" );

Further Information

Operator Actions

To learn where you can use this function.

Structured Text Function Call

To learn about calling a function from IEC 61131-3 structured text.

IEC 61131-3 Expressions

To learn about the different types of expression to use as function parameters.

SQL Language

To learn about the syntax of SQL statements in Fernhill SCADA.

Glossary

For definitions of the terms used in Fernhill SCADA.