Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ InTouch HMI

SQLLoadStatement() function

  • Last UpdatedJun 17, 2024
  • 1 minute read

The SQLLoadStatement() function reads a SQL statement from a file.

There can be only one statement per file. However, SQLAppendStatement() function can be used to append something to the statement if SQLPrepareStatement() function or SQLExecute() function has not been called.

Category

SQL

Syntax

[ResultCode=]SQLLoadStatement(ConnectionID, FileName);

Arguments

ConnectionID

Name of a memory integer tag that holds the number (ID) assigned by the SQLConnect() function to each database connection.

FileName

Name of the file containing the SQL statement.

Remarks

After you load the statement and get the statement handle, use the SQLPrepareStatement() function to prepare the statement for execution.

Example

The SQL.txt file contains the following SQL statement:

Select ColumnName from TableName where ColumnName>100;

The SQLLoadStatement() function loads the statement from the file.

ResultCode=SQLLoadStatement(ConnectionID,
"C:\SQL.txt")

See Also

SQLConnect(), SQLAppendStatement(), SQLExecute(), SQLPrepareStatement

TitleResults for “How to create a CRG?”Also Available in