MyDump and views

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
ben
Posts: 119
Joined: Wed 17 Nov 2004 19:48

MyDump and views

Post by ben » Wed 21 Nov 2007 19:31

Hello,

I want to create a backup file using MyDump but I want to exclude Views. MyDump incorrectly adds Views to the backup file.

Any way to fix it without waiting for a fixed version?

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Thu 22 Nov 2007 08:11

There were problems with backup data for views, but they were fixed in MyDAC 4.30.0.12. Do you mean these problems?
Or you mean that CREATE/DROP statements for views must not be generated if doTables is included into TMyDump.Objects?

ben
Posts: 119
Joined: Wed 17 Nov 2004 19:48

Post by ben » Thu 22 Nov 2007 09:29

I dont want views. I want only pure tables. MyDump also backups views and there is no option NO to backup those views.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Thu 22 Nov 2007 09:55

There are following possible solutions:
1) fill the TMyLoader.TableNames property with table names you want to backup;
2) change source code of MyDAC at your side (if you have MyDAC sources).

In the nearest build of MyDAC we are planning to add an option for views.

ben
Posts: 119
Joined: Wed 17 Nov 2004 19:48

Post by ben » Thu 22 Nov 2007 14:20

I dont know the table names :\

So I have to wait for the nearest MyDAC build.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Thu 22 Nov 2007 15:33

You can use the following query to get names of all table in a database:

Code: Select all

  SHOW TABLE STATUS FROM db_name WHERE NOT ENGINE IS NULL;
Now you need to generate table names list from this dataset, and assign it to TMyDump.TableNames.

Post Reply