Page 1 of 1

MyDac and Source Command

Posted: Mon 11 Apr 2005 10:25
by lfelicetti
Anyone can help me with this problem?

try to do in a mysql shell this

mysql> source c:/dump.sql;

and try to do this with a mycommand

it show an error.

It's a bug? or what?

Versions

Posted: Mon 11 Apr 2005 11:02
by Guest
Delphi 2k5 update 2
MyDac 3.50.0.18

Posted: Mon 11 Apr 2005 15:09
by Ikar
Command source is a command of "mysql.exe" utility. To run scripts with MyDAC use TMyScript.

TmyScript

Posted: Mon 11 Apr 2005 15:19
by lfelicetti
I need to load an huge script...About 256Mb of .sql. TMyScript leaks too memory when i do a myscript1.sql.loadfromfile('c:\mydump.sql');.
How i can solve this?

Posted: Tue 12 Apr 2005 12:49
by Ikar
Now MyDAC doesn't support such functionality. We are planning to extend functionality of TMyScript to execute large scripts in MyDAC 4.0, but most likely queries in this script must be divided by some specific dividers.

Re: MyDac and Source Command

Posted: Tue 28 Mar 2017 14:22
by vindac
Hi,
I see this post is from 2005. Is this possible by now to restore a big mysql file? The TMyScript is using too much memory in my case too...

Re: MyDac and Source Command

Posted: Fri 31 Mar 2017 09:51
by ViktorV
In order to execute SQL commands from file, you can use the ExecuteFile method of the TMyScript component to save memory consumption.