Windows Develop Bookmark and Share   
 index > Windows Forms General > Backup Facility Problem
 

Backup Facility Problem

Hi All,
        I am using VS05+ C# + Acess databse.
 I have created an application using Acess database. I want to create an utility in which there should be facility to user ,for take a back up of database and restore that database .
How to do this stuff ?

Thanks in advance.
sunDAC  Friday, October 02, 2009 7:18 AM
An Access dbase is just a file.  Use System.IO.File.Copy().

Hans Passant.
nobugz  Friday, October 02, 2009 8:54 AM
may be create a folder for back up..and on pressing the backup button copy the test.mdb file to the backup folder when user press resore replace the test.mdb file which is present in the back up folder to the data folder..if you doesnot want to replace the database try renaming the present database to some other name and then copy back to thedata folder..
Bharath kumar Y.S  Monday, October 05, 2009 8:53 AM
An Access dbase is just a file.  Use System.IO.File.Copy().

Hans Passant.
nobugz  Friday, October 02, 2009 8:54 AM
Hi Thanks for the reply,
Can u please elabrate the point. I have a two button BackUp And Restore . When i click BackUp button at that time backup of  database suppose Test.mdb should be taken at particular location
2) when i click on Restore button and browse and select Test.mdb at that time the database should be restored as well as it cant affect my previous database.

I have given path of database as
string path = Application.StartupPath+\\Data\\Test.mdb;
at every time i have to store database in Data Folder.
How can do this stufff?  what should i do?

Thank You.
sunDAC  Monday, October 05, 2009 7:14 AM
may be create a folder for back up..and on pressing the backup button copy the test.mdb file to the backup folder when user press resore replace the test.mdb file which is present in the back up folder to the data folder..if you doesnot want to replace the database try renaming the present database to some other name and then copy back to thedata folder..
Bharath kumar Y.S  Monday, October 05, 2009 8:53 AM

You can use google to search for other answers

Custom Search

More Threads

• Setting Combobox default item at Design time
• Listview organizing
• OFFICIAL SURVEY about your usage of the .NET Framework documentation!
• Change color of an item in combobox
• How to let text box do not get focus?
• Dropdownlist checkbox or multiselect
• MdiChild window forgets its State (maximized) when hiding
• Any sample pages how to use regex with RichTexBox?
• Can't resize ToolStripTextBox
• selecting an object