public void RestoreIt(MySqlConnection myConnection) { myConnection.Open(); MySqlDump mySqlDump = new MySqlDump(); mySqlDump.Connection = myConnection; mySqlDump.CommitCount = 3; StreamReader stream = new StreamReader("d:\\tmp\\mydump.dmp"); mySqlDump.Restore(stream); stream.Close(); myConnection.Close(); Console.WriteLine("Restored."); }
Public Sub RestoreIt(ByVal myConnection As MySqlConnection) Dim mySqlDump As New MySqlDump myConnection.Database = "Test" myConnection.Open() mySqlDump.Connection = myConnection mySqlDump.CommitCount = 3 Dim stream As New StreamReader("d:\tmp\base.dump") mySqlDump.Restore(stream) stream.Close() myConnection.Close() Console.WriteLine("Restored.") End Sub
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