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:

<code>

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

</code>

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 Jeff Robertson
Scroll to Top