Page 1 of 1

TMySctipt, Delimiter problem once more.

Posted: Sun 05 Jun 2011 13:36
by m227
Please tell me how to format script like below to be executed without error in TMyScript component.

Code: Select all

DROP PROCEDURE IF EXISTS Raport23$$
CREATE PROCEDURE Raport23(pr  INT)
COMMENT 'karta pracy produktu'
READS SQL DATA
BEGIN
  SELECT * FROM Operation;
END$$
CALL CacheListReports()$$
I setup also TMyScript.Delilmiter property to $$ with no effect.
I also tried to add explicitly command DELIMITER $$ at start with no change.

Michal, Poland

Bug found

Posted: Sun 05 Jun 2011 13:51
by m227
I found that when i put SPACE before my delimiter ($$) it works, however in original SQL it is not necessary. Below is a working code.

Code: Select all

DELIMITER $$
DROP PROCEDURE IF EXISTS Raport23 $$
CREATE PROCEDURE Raport23(pr  INT)
COMMENT 'karta pracy produktu'
READS SQL DATA
BEGIN
  SELECT * FROM  Operation;
END $$
CALL CacheListReports() $$
DELIMITER ;

Posted: Mon 06 Jun 2011 12:15
by AndreyZ
Hello,

In the latest MyDAC version (6.10.0.7), you can execute the following script without putting the space character before your delimiter:

Code: Select all

DELIMITER $$
DROP PROCEDURE IF EXISTS Raport23$$
CREATE PROCEDURE Raport23(pr  INT)
COMMENT 'karta pracy produktu'
READS SQL DATA
BEGIN
  SELECT * FROM  Operation;
END$$
CALL CacheListReports()$$
DELIMITER ;