|
-
Oct 24th, 2006, 06:04 AM
#12
Re: [2005] Saving to a database doesnt actually change anything
When you add an MDB file to your project it is a source file, just like all your code files etc. You wouldn't want to make changes to that original while testing because you want to be able to distribute a clean database with your app. You can set the properties of the MDB file such that each time you build your project the file will be copied to the output folder every time, only when the source is newer or never. The default behaviour is to copy the file every time you build the project, which means every time you run it in the debugger also. That means that every time you debug your project you lose any data changes you made last time you ran it. The most sensible setting, and the one Microsoft should have chosen as the default in my opinion, is to copy if the source is newer. That means you will keep all your data changes made while debugging until you make a data or schema change to the source file itself, at which point the old file in the output folder will be overwritten. If ever you specifically want to overwrite the file in the output folder, like when you're ready to distribute, you simply change the properties to copy always to ensure a fresh copy is created and build your project.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|