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

In This Topic
    IncludeUsers Property
    In This Topic

    Determines whether to include GRANT statements for users into the dump text.

    This property is obsolete. Use ObjectTypes property instead.

    Syntax
    'Declaration
     
    Public Property IncludeUsers As Boolean
    public bool IncludeUsers {get; set;}

    Property Value

    true, if GRANT statemets for users should be added into dump text; otherwise, false. The default value is false.
    Example
    This sample shows how to dump table data and GRANT statements for users.
    public void DumpIt(MySqlConnection myConnection)
    {
      myConnection.Open();
      MySqlDump mySqlDump = new MySqlDump();
      mySqlDump.Connection = myConnection;
      myConnection.Database = "Test";
      mySqlDump.IncludeUsers = true;
      mySqlDump.Tables = "Emp;Dept";
      mySqlDump.Backup();
      StreamWriter stream = new StreamWriter("d:\\tmp\\mysqldump.dmp");
      stream.WriteLine(mySqlDump.DumpText);
      stream.Close();
      Console.WriteLine("Dumped.");
      myConnection.Close();
    }
    Public Sub DumpIt(ByVal myConnection As MySqlConnection)
      myConnection.Open()
      Dim mySqlDump As MySqlDump = New MySqlDump
      mySqlDump.Connection = myConnection
      myConnection.Database = "Test"
      mySqlDump.IncludeUsers = True
      mySqlDump.Tables = "Emp;Dept"
      mySqlDump.Backup()
      Dim stream As StreamWriter = New StreamWriter("d:\tmp\mysqldump.dmp")
      stream.WriteLine(mySqlDump.DumpText)
      stream.Close()
      Console.WriteLine("Dumped.")
      myConnection.Close()
    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