dotConnect for MySQL Documentation
Devart.Data.MySql Namespace / MySqlDump Class / ObjectTypes Property
Example

In This Topic
    ObjectTypes Property
    In This Topic
    Gets or sets a value that indicates which database objects will be included in the dump text.
    Syntax
    'Declaration
     
    Public Property ObjectTypes As MySqlDumpObjects
    public MySqlDumpObjects ObjectTypes {get; set;}

    Property Value

    A combination of MySqlDumpObjects values.
    Example
    The following example dumps only triggers and events from the 'Test' database.
    static void Main(string[] args) {
    
            MySqlConnection connection = new MySqlConnection("user id=root;password=root;host=localhost;port=3306;database=Test");
            connection.Open();
    
            MySqlDump mySqlDump = new MySqlDump(connection);
            mySqlDump.ObjectTypes = MySqlDumpObjects.Triggers | MySqlDumpObjects.Events;
            mySqlDump.Backup("D:\temp\mydump.dmp");
    
            connection.Close();
            Console.WriteLine("Dumped.");
            Console.ReadKey();
    }
    Sub Main()
            Dim connection As MySqlConnection = New MySqlConnection("User Id=root;Password=root;Host=localhost;Port=3306;Database=Test;")
            connection.Open()
    
            Dim mySqlDump As MySqlDump = New MySqlDump(connection)
            mySqlDump.ObjectTypes = MySqlDumpObjects.Triggers Or MySqlDumpObjects.Events
            mySqlDump.Backup("D:\\temp\\mydump.dmp")
    
            connection.Close()
            Console.WriteLine("Dumped.")
            Console.ReadKey()
    End Sub
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also