Serves to store a database or its parts as a script and to restore database from the generated script.
For a list of all members of this type, see MySqlDump members.
Devart.Data.MySql.MySqlDump
[Visual Basic]
Public Class MySqlDump
Inherits Component
Implements IComponent , IDisposable [C#]
public class MySqlDump : Component , IComponent , IDisposable MySqlDump by its behaviour is similar to mysqldump program.
Use Tables property to specify a list of tables to be stored. If Tables property is an empty string all tables will be included into the dump text. To generate a script call Backup method. Result script can be viewed in DumpText. To run it on a database, use Restore method.
When generating scripts, all operations are executed within database that Database property of associated MySqlConnection object references to. When restoring tables using the generated script, the property Database is used only if IncludeDatabase has been set to false in the moment of script generation.
If the Unicode is true, MySqlDump uses UTF8, otherwise it uses default encoding.
Note: This class is available with dotConnect for MySQL Professional edition only.
The following example creates a MySqlDump component and executes backup of the specified tables using Backup method. After execution of backup operation the result is saved at d:\tmp\mysqldump.dmp file. The second routine executes the generated script using Restore method.
[C#]
public void DumpIt(MySqlConnection myConnection) |
[Visual Basic]
Public Sub DumpIt(ByVal myConnection As MySqlConnection) |
MySqlDump Members | Devart.Data.MySql Namespace
© 2002 - 2008 Devart. All Rights Reserved.