MyDac and Source Command

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
lfelicetti
Posts: 5
Joined: Tue 08 Mar 2005 12:07

MyDac and Source Command

Post by lfelicetti » Mon 11 Apr 2005 10:25

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?

Guest

Versions

Post by Guest » Mon 11 Apr 2005 11:02

Delphi 2k5 update 2
MyDac 3.50.0.18

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Mon 11 Apr 2005 15:09

Command source is a command of "mysql.exe" utility. To run scripts with MyDAC use TMyScript.

lfelicetti
Posts: 5
Joined: Tue 08 Mar 2005 12:07

TmyScript

Post by lfelicetti » Mon 11 Apr 2005 15:19

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?

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Tue 12 Apr 2005 12:49

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.

vindac
Posts: 20
Joined: Tue 18 Mar 2014 16:44

Re: MyDac and Source Command

Post by vindac » Tue 28 Mar 2017 14:22

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...

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: MyDac and Source Command

Post by ViktorV » Fri 31 Mar 2017 09:51

In order to execute SQL commands from file, you can use the ExecuteFile method of the TMyScript component to save memory consumption.

Post Reply