- I selected copy database into project environment that make vc# to copy .mdf into my project directory.
- At Solution Explorer I see Books.mdf. In its properties "Copy to Output Directory" --> "Copy always" was selected. That mean every time I run my application, the original database will be copy to my output directory!! Everything I had changed last time I ran will be replaced.
- Solution is change property value from "Copy always" to "Copy if newer"
I found the solution.
- I selected copy database into project environment that make vc# to copy .mdf into my project directory.
- At Solution Explorer I see Books.mdf. In its properties "Copy to Output Directory" --> "Copy always" was selected. That mean every time I run my application, the original database will be copy to my output directory!! Everything I had changed last time I ran will be replaced.
- Solution is change property value from "Copy always" to "Copy if newer"
Reply