[英]Best way to update a live database while persisting data?
In short; 简而言之; I have created a small WinForms application for a friend.
我为朋友创建了一个小型WinForms应用程序。
Whilst my friend was using the application I decided to make changes to the application. 当我的朋友正在使用应用程序时,我决定对应用程序进行更改。 In doing so I added a few columns to tables within the database.
为此,我向数据库中的表添加了几列。
I now want to implement that changes, what is the best way to get his database up to date with all the new columns whilst keeping his data intact? 我现在要实现这些更改,什么是使他的数据库与所有新列保持同步的最佳方法?
Thanks in advance! 提前致谢!
Use: 采用:
ALTER TABLE ADD NewColumn nvarchar(50) NULL
and run the required statements using SqlCeCmd.ExecuteNonQuery 并使用SqlCeCmd.ExecuteNonQuery运行所需的语句
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.