Can a cMT SQL Advanced Query command call a SQL Stored Procedure?

Tags: FAQcMTSQL

Can a cMT SQL Advanced Query command call a SQL Stored Procedure?

Yes, SQL stored procedures can be called from the Advanced SQL Query object in EBPRO.

The role of HMI is just a client, the HMI simply sends the command
to SQL server to execute the stored procedure.

In order to call a stored procedure, use the keyword EXEC followed by the name of the stored procedure in brackets.

For example:

EXEC [Insert_Maple2] @Comment = ‘${1}’;

where “Insert_Maple2” is the name of the stored procedure, “Comment” is a string argument of the stored procedure and “${1}” is an adv. query command argument representing a 10-word string stored in local HMI memory.

Content Created by Support Team
Scroll to Top