如何更新现有的winform应用程序设置及其数据库 [英] How to Update an existing winform application setup and its database

查看:92
本文介绍了如何更新现有的winform应用程序设置及其数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用sql server在VS.NET 2010中编写的Windows窗体应用程序。此应用程序安装在我的系统上。现在我想更新此设置中的一些功能意味着添加一些功能。并在db(mdf)文件中进行一些更改。我怎样才能做到这一点 。



就像版本更新一样。



你好

多数民众赞成我的意思寻找。

I have a windows forms application written in VS.NET 2010 with sql server. This application is installed on my system. Now i want to update some features in this setup means add some functionality. and make some changes in db (mdf) file also. how can i do this .

just like version updated.

Hello
Thats what I am looking for.

When i Create setup of my application there is an option remove existing version in properties. This is replace existing version of my application but it also replace database file. How i handle this problem. I have also changes in database.(like add some tables, procedures etc).

推荐答案

要更新可执行文件/库,你必须拥有源代码,您可以更新然后重新编译。它将为您提供新的更新的可执行文件/库。



对于您的数据库,您必须创建一些脚本来更新现有数据库的模式。



然后你必须创建一个新的部署包,它将:

- 用新的替换旧的exutable /库

- 对现有数据库执行SQL脚本以更新其架构,而不会丢失当前数据。
To update your executable/libraries, you must have the source code, that you can update and then recompile. It will give you new updated executable/libraries.

For your database, you have to create some script(s) that will update your existing database's schema.

Then you have to create a new deployment package that will :
- replace the old exutable/libraries with the new one(s)
- execute the SQL script(s) against the existing database to update its schema without loosing current data.


这篇关于如何更新现有的winform应用程序设置及其数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆