Windows Develop Bookmark and Share   
 index > Windows Forms General > Update
 

Update

i have a databse and i want to keep my data in the database when i reinstall my program...what file i copy ?
Computer Freek  Monday, January 21, 2008 7:42 AM

Hi, Computer Freek,

Based on my understanding, you want to keep the mdf file when you reinstall your application, don't you?

Well, to do this job, you should add the application files separately through "Add"->"File..."

Then you can set the "Permanent" property of this mdf file to true.

After that, when you uninstall your application, the mdf will not be removed and when you reinstall the application, the mdf will not be over written as well.

Hope this helps,

Regards

Yu Guo â€?MSFT  Wednesday, January 23, 2008 9:19 AM
but if i want to copy the mdf file to another user's computer wat file do i copy ? and what os you using in the screenshot ?
Computer Freek  Wednesday, January 23, 2008 1:51 PM

Hi, Computer Freek,

What you you mean of "copy the mdf file"?

How do you actually install anduninstall your application?

The screenshot is for a Setup Project.

Setup Project is used to create Windows Installer Deployment.

Don't you use it to deploy your application?

http://msdn2.microsoft.com/en-us/library/2kt85ked.aspx

Regards

Yu Guo â€?MSFT  Thursday, January 24, 2008 1:36 AM
what i want to do is to copy the data in my database to another user's computer....
Computer Freek  Thursday, January 24, 2008 8:36 AM

Hi, Computer Freek

Are you trying to do the same thing as this thread?

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2713333&SiteID=1

Regards
Yu Guo â€?MSFT  Thursday, January 24, 2008 9:00 AM
not really i say i want to copy the database because it will be easier 4 all to understand...
but i want to back up my database how do i do that ?
Computer Freek  Thursday, January 24, 2008 10:59 AM

Hi, Computer Freek,

To back up your DataBase, you should just back up your MDF file.

Here is an article talking about the Data Source files in .Net.

http://msdn2.microsoft.com/en-us/library/8s2t4x15.aspx

The currently supported formats of local data files are SQL Server Compact 3.5 (.sdf), Access (.mdb) and SQL Express (.mdf) files.

Hope this helps,

Regards

Yu Guo â€?MSFT  Friday, January 25, 2008 1:43 AM

You can use google to search for other answers

Custom Search

More Threads

• build issue
• MessageBox sound options?
• How to Properly Determine the Default Font for UI Controls?
• Mdi Container and a left Menu
• Ceate Instance
• Using Inherited Forms
• Hyperlinks
• Is WebBrowserShortcutsEnabled = false supposed to disable menu access?
• DrawToBitmap and Custom NonClientArea
• Combobox in DataGridView causes invalid operation exception