Support Center - Help topic

Home > Support Center > Search > Help Topic
Contact Us
Can't find what you're looking for in our Tech Support Library? Send us a message.
Contact Us
Can a cMT SQL Advanced Query command call a SQL Stored Procedure?
Tags: FAQ SQL cMT

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 Derek Thompson