Wednesday, March 28, 2012

Saving original SQL Database and My.Settings when reinstalling or updating

Hello all...

I am working on a project that contains several databases in SQL and many settings. The problem I am encountering is that I want to be able to update the program for all my customers. That is no problem.

The problem I am meeting is where, when the program is updated, all the settings and all the information in the databases reverts to the default values, or the values that were compiled with the new update.

I want to be able to update their program without deleting all the settings they have.

Thanks,

Andreas Renberg

hi Andreas,

IQ Andreas wrote:

Hello all...

I am working on a project that contains several databases in SQL and many settings. The problem I am encountering is that I want to be able to update the program for all my customers. That is no problem.

The problem I am meeting is where, when the program is updated, all the settings and all the information in the databases reverts to the default values, or the values that were compiled with the new update.

I want to be able to update their program without deleting all the settings they have.

Thanks,

Andreas Renberg

as regard "settings", I'm calling me out as I do not usually store important settings but connection information such as server name and the like in a kinda of setting file...

as regard the database, you have to modify the way you provide your database to the end user as, obviously, overwriting his/her database with your in order to update metadata (adding tables, modifying procedures and the like) will make all his/her data vainishing..

so you usually should go for alternative solutions in order to deploy database metaschema updates.. have a look at http://msdn.microsoft.com/msdnmag/issues/04/09/customdatabaseinstaller/, a nice article about that, where the presented solution is simple and efficient... more, it let you manage the relative DDL code under source code control systems like Visual Source Safe..

regards

No comments:

Post a Comment