Hi,
During the execution of the MyScript.ExecuteFromFile, I'm having problems when the script file has triggers and procedures creation statements.
I am using MySQL server 5.5.6rc for 64bit, MyDAC 7.1 and Delphi 2010.
It seems that the ExecuteFromFile is ignoring the DELIMITER statement in my script and it gives me an error during the execution of the script.
Here is the script file: https://dl.dropbox.com/u/19709075/script.sql
Here is the error message: https://dl.dropbox.com/u/19709075/mysqlerror.sql
The error only occurs during the execution in MyScript component. If I take this script and execute it in HeidiSQL program for example, all run OK without errors.
What can I do do fix this?
Thanks
Problems with MyScript
-
DemetrionQ
- Devart Team
- Posts: 271
- Joined: Wed 23 Jan 2013 11:21
Re: Problems with MyScript
Hello.
Bug with executing a SQL script that contains a DELIMITER keyword was fixed in MyDAC 7.2.7. Please download the MyDAC version 7.2.7 or higher and check whether the error repeats.
Bug with executing a SQL script that contains a DELIMITER keyword was fixed in MyDAC 7.2.7. Please download the MyDAC version 7.2.7 or higher and check whether the error repeats.
-
andrea.m86
- Posts: 25
- Joined: Thu 26 May 2011 10:36
Re: Problems with MyScript
hi,
i have the version 7.6 of the components and i also have a problem with tmyscript.
if i use '^' as delimiter i get this error from myclasses:
here is the code to reproduce the issue:
i have the version 7.6 of the components and i also have a problem with tmyscript.
if i use '^' as delimiter i get this error from myclasses:
if i use (for example) '#' everything works.exception message : #42000You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '^' at line 1.
here is the code to reproduce the issue:
Code: Select all
d := '^';
script.delimiter := d;
script.sql.text := 'create procedure test() begin select * from art; end' + d;
script.execute;-
DemetrionQ
- Devart Team
- Posts: 271
- Joined: Wed 23 Jan 2013 11:21
Re: Problems with MyScript
Hello.
We have reproduced the problem and been investigating it.
Presently, for TMyScript.Delimiter you can use only ";" or "/" symbols. If delimiter = "/" , then, when writing SQL scripts, the "/" delimiter must be a single character in a line.
We have reproduced the problem and been investigating it.
Presently, for TMyScript.Delimiter you can use only ";" or "/" symbols. If delimiter = "/" , then, when writing SQL scripts, the "/" delimiter must be a single character in a line.