I would never actually save any information to the 'original' database file until the user chooses either Save or Save As. Many times people can work on a project then realize that it was better before they started working on it, so they want to go back to the time where they started. For many reasons a rollback won't work, so they are screwed.
I set it up so when a user chooses a file to work on I copy it to the temp folder, allow them to make any changes they want(to the temp file) and both Save and Save As are the same thing, I either copy the temp to the original or copy the file to the 'new' spot they want. Like this if the computer crashes I can give them the "found something you were working on" dialog as well when they run the program again.
|