http://stackoverflow.com/questions/5337040/create-a-backup-database-with-c-sharp
http://www.c-sharpcorner.com/Forums/Thread/64896/
http://www.daniweb.com/software-development/csharp/threads/202843/take-backup-of-sql-server-database-using-c
http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataproviders/thread/4fbdec33-76d3-4e1e-bb33-6427a76665de/
http://vinothnat.blogspot.in/2009/01/how-to-taking-backup-database-using-c.html
http://www.dotnetobject.com/Thread-Mysql-backup-using-c
http://www.c-sharpcorner.com/Forums/Thread/64896/
http://www.daniweb.com/software-development/csharp/threads/202843/take-backup-of-sql-server-database-using-c
http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataproviders/thread/4fbdec33-76d3-4e1e-bb33-6427a76665de/
http://vinothnat.blogspot.in/2009/01/how-to-taking-backup-database-using-c.html
http://www.dotnetobject.com/Thread-Mysql-backup-using-c
private void btnBackUp_Click(object sender, EventArgs e)
{
string CurrentDatabasePath =Environment.CurrentDirectory + @"\Database3.accdb";
FolderBrowserDialog fbd = new FolderBrowserDialog();
if (fbd.ShowDialog() == DialogResult.OK)
{
string PathtobackUp = fbd.SelectedPath.ToString();
File.Copy(CurrentDatabasePath,PathtobackUp+@"\BackUp.accdb",true);
MessageBox.Show("Back Up SuccessFull! ");
}
}
private void button2_Click(object sender, EventArgs e)
{
string PathToRestoreDB = Environment.CurrentDirectory + @"\Database3.accdb";
OpenFileDialog ofd = new OpenFileDialog();
if (ofd.ShowDialog() == DialogResult.OK)
{
string Filetorestore = ofd.FileName;
// Rename Current Database to .Bak
File.Move(PathToRestoreDB, PathToRestoreDB +".bak");
//Restore the Databse From Backup Folder
File.Copy(Filetorestore, PathToRestoreDB,true);
}
}
This comment has been removed by the author.
ReplyDelete