string constring1 = "SERVER=localhost;" + "DATABASE=;" + "UID=root;" + "PASSWORD=;" + "Convert Zero Datetime=True;" + "Allow Zero Datetime=True"; using (MySqlConnection conn = new MySqlConnection(constring1)) { using (MySqlCommand cmd = new MySqlCommand()) { using (MySqlBackup mb = new MySqlBackup(cmd)) { cmd.Connection = conn; conn.Open(); mb.ExportInfo.AddCreateDatabase = true; mb.ExportInfo.ExportTableStructure = true; mb.ExportInfo.ExportRows = false; mb.ExportToFile(file1); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)