如何使用数据库部署Windows应用程序 [英] How to deploy windows application with database

查看:88
本文介绍了如何使用数据库部署Windows应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的应用程序与数据库作为sqlserver我可以部署和创建安装程序并安装它在我的机器上工作正常但它不能在另一台机器上工作可以任何人指导我连接和部署关于Windows应用程序和SQL服务器。

解决方案

您需要您的用户部署SQL Server,然后您需要在应用程序中设置连接字符串,然后您需要运行SQL来创建或从那里附加数据库。使用不需要服务器的紧凑型DB(如SQLite)要容易得多。


在客户端PC中安装SQL Server,否则如果其他PC在同一网络中,则
否则使用像MS ACCESS这样的其他数据库,这对于服务器不需要像克里斯蒂安先生那样..

为了访问数据库,提供带有sql配置服务器端口号的IP地址,并在发布应用程序之前将sql server created user的用户名和密码提供到连接字符串中,然后你就不必更改您的数据库的位置。



使用数据库发布基于窗口的应用程序非常简单。正确点击您在解决方案资源管理器中看到的项目 - >点击发布 - >选择要保存已发布项目的位置 - >点击下一步 - >并在结束时单击完成按钮。之后,您可以在给定位置获取项目的整个发布文件。


I have an simple application with database as sqlserver I can deploy and create setup and install it works fine in my machine but it doesn't work in another machine can any one guide me to connection and deploy about windows app and sql server.

解决方案

You need your user to deploy SQL Server, then you need to set up the connection string in your app, and then you need to run SQL to create or attach the DB from there. Using a compact DB that doesn't require a server, like SQLite, is much easier.


Install SQL Server In Your Client PC else if other pc is in the same network, then
give the proper connection string to connect with your server,
Else use some other db like MS ACCESS which is not needed to Server as like Mr. Cristian said..


For accessing the database provide the IP address with port number of your sql configuration server and provide username and password of your sql server created user into your connection string before publish you application then you never have to change the location of your databse.

It is very easy procedure to publish window based application with database. Just Right Click on your project as you see in solution explorer -> Click on Publish -> Select your location where you wants be save published project -> Click on Next -> and at end Click on Finish button. After that you can get whole the publish file of your project over the given location.


这篇关于如何使用数据库部署Windows应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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