Hi i have created weeks ago a WPF( visual studio 2010) application which runs offline localy on my pc.I is connected to a database(MS SQL .mdf) ofcourse and it works well. but now i need to make an update of the application and i wonder how to do it the main issue for me is how not to start with the empty database again how to make the update and use the already filled database? Any referals to where i can read something or some examples. THX EDIT: if its possible i want to do the update not using internet. The database structure is the same one i just made some changes to the code behind...
Asked
Active
Viewed 237 times
2 Answers
1
You need an SQL Schema Compare
tool to compare your old SQL Schema and new SQL Schema.
There are various tools, in fact Visual Studio
even has one.
But for complex scenarios you may have free alternatives
All you need is to define schema changes between your databases, and edit the generated diff SQL in order to preserve the data.
1
i use SchemaCompares for that.
I create a new database ( I use local db) which contains all changes. After that i use the VS SchemaCompare to update my old one.
The SchemaCompare matches the diffences between both and update the old one. MSDN
The compare has also the abilty to fill not nullable new columns(native types) with the default values from the framework( int=0, bool=false...).

Sukram
- 456
- 3
- 16