Skip to content
  • There are no suggestions because the search field is empty.

Creating simple stored procedure for OPC Data Logger MySQL data storage

How do I create a stored procedure for a MySQL data storage?

To create a simple 'insert' stored procedure in MySQL the stored procedure should follow this example format:


CREATE DEFINER=`root`@`localhost` PROCEDURE `procedure_Name`
(TimeValue datetime,
Tag1 float,
String_1 varchar(150),
String_2 varchar(150))

BEGIN
     INSERT INTO tbl_test
    (TimeValue, Tag1, String_1, String_2) 
    values
    (
    TimeValue,Tag1,String_1,String_2    
    );
END

 

It is recommended that the names used for your presentation in Data Logger match the field names of the columns in MySQL.

Please note that the use of IN, OUT, and INOUT are not supported.