Page 1 of 1

Problems with MyScript

Posted: Fri 01 Mar 2013 14:37
by lucasbarao
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

Re: Problems with MyScript

Posted: Mon 04 Mar 2013 12:52
by DemetrionQ
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.

Re: Problems with MyScript

Posted: Mon 04 Mar 2013 14:20
by andrea.m86
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:
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.
if i use (for example) '#' everything works.

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;

Re: Problems with MyScript

Posted: Thu 07 Mar 2013 16:06
by DemetrionQ
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.