"Failed To Update .mdf Database." Some months before while in a windows project i came through this problem.
I gooled enough and found some vital information which i like share on this topic.

I'll put it one by one for easy understanding.
No matter whether its XP, Vista or Windows7. The Solution is all the same.

1. Just go to the program files and find the folder of the installed program.
2. Just right click the .mdf file in the folder and click PROPERTIES.
3. In PROPERTIES TAB -> SECURITY ->you'll see Group or Usernames.
4. In that select the User to which u want to give Access to the file.
5. If for that user the PERMISSION is not set to FULL CONTROL.
7. Now the Group or Username box will open.
8. In that Select The User -> Select FULL CONTROL in Permission Box.
9. Now follow the steps for the log file too. IF Needed.