How Can Flush MyDump Cache After Executing or Restoring ?

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
cancer-x
Posts: 2
Joined: Thu 20 Oct 2011 13:22

How Can Flush MyDump Cache After Executing or Restoring ?

Post by cancer-x » Thu 20 Oct 2011 13:33

Hello all,

I searched forum but i haven't find any solution yet.

Case : I have two tables and i want to dump like this :

//First table proc.. table1
mydump.connection := conn1;
mydump.BackupQuery('etc...from table1);
mydump.connection := conn2;
mydump.Restore

//Clear all
mydump.Sql.clear;

//Second table proc. table2
mydump.connection := conn1;
mydump.BackupQuery('etc...from table2);
mydump.connection := conn2;
mydump.Restore;

Problem is the first one getting right sql script like "insert into table1" etc.. with correct data(table1 data), but second one getting same "insert into table1 etc.." statements with correct data ( table2 data). ??

How can i reset MyDump object after first use? I tried everything bu i cant reset MyDump cache or whatelse...

Thanks,

cancer-x
Posts: 2
Joined: Thu 20 Oct 2011 13:22

Post by cancer-x » Thu 20 Oct 2011 13:56

I found solution writing same BackupQuery double times, so stupidly but no way i mean...

myDump.BackupQuery('select ...from table2');
//And again
myDump.BackupQuery('select ...from table2);
...
etc.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Thu 20 Oct 2011 15:49

It is good to see that this problem has been solved.

Post Reply