在 WPF 中部署应用程序和数据库
我有一个 WPF 应用程序,它有一个 SQL Server 数据库。该应用程序的所有用户都能够执行以下操作:
只需单击一下即可在本地安装该应用程序以及数据库(没有数据的空白表)。此后,他们将能够在自己的计算机上本地运行该应用程序。所有用户的计算机上都安装了 SQL Server。
能够获取应用程序和数据库的更新(或更新通知),并且能够安装更新(如果他们选择这样做)。
我意识到 ClickOnce 只能为应用程序执行此操作。现在既然我有了数据库和应用程序,我该怎么做呢?
任何帮助将不胜感激。
I have a WPF application and it has a SQL Server database. All users of the application will be able to do the following:
Be able to install the application locally, and also the database (blank tables with no data) using a single click. Henceforth they will be able to run the application locally on their own machines. All the users have SQL Server installed on their machines.
Be able to get updates (or notification of updates) on the application and database, and will be able to install the updates if they choose to do so.
I realize that ClickOnce can do it for the application only. Now since I have the database along with the application, how can I do it?
Any help will be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您的用户对其数据库拥有足够的权限(我希望他们拥有),您可以简单地在应用程序启动时检查数据库是否准备就绪,如果没有,则在其上运行创建脚本。
If your users have the adequate permissions over their database (which I hope they have) you could simply check that the DB is ready at application Startup, and if not, run the creation scripts on it.
您可以将 SQL Server 紧凑型数据库与您的应用程序一起部署。示例如下: http ://robindotnet.wordpress.com/2010/02/28/how-to-deploy-the-sqlserver-compact-edition-software-locally/
对于 SQL Server 2005 / 2008,用户必须使用 Microsoft 提供的安装程序。
You can deploy an SQL Server compact database along with your application. Sample here: http://robindotnet.wordpress.com/2010/02/28/how-to-deploy-the-sqlserver-compact-edition-software-locally/
For SQL Server 2005 / 2008 the user must use the Microsoft provided installers.