Generate Script

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
azis
Posts: 6
Joined: Mon 28 Feb 2011 05:26

Generate Script

Post by azis » Thu 03 Mar 2011 02:23

I have some table, that is to be send in branch one to branch others or the other way. i want to generate script insert into or delete , each rows


what is posible by use of MyDump or Script.


thank's

Azis

AndreyZ

Post by AndreyZ » Thu 03 Mar 2011 12:24

Hello,

You should use the TMyDump component that serves to store a database or its parts as a script and to restore a database from the received script. Here is an example of backing up a table:

Code: Select all

MyDump.TableNames := 'your_table';
MyDump.BackupToFile('backup_file_name');
And here is an example of restoring from backup file:

Code: Select all

MyDump.RestoreFromFile('backup_file_name');
For more information, please read the MyDAC documentation.

Post Reply