I have problem with creating a simple MySQL trigger in C#. I'm using StringBuilder to build the following command string:
DELIMITER $$
DROP TRIGGER /*!50032 IF EXISTS */ dbname.table$$
CREATE TRIGGER dbname.inserttrigger AFTER INSERT ON dbname.table
FOR EACH ROW BEGIN
...
END;
$$
DELIMITER ;
when I try cmd.executeNonQuery() an Exception occurs (Error in SQL syntax) which is despite the new lines referring to LINE 1. - The Stringbuilder will put in "\r\n" for every AppendLine().
If I copy and paste the command to the MySQL console it runs fine.