如何使用sqlserver数据库发布VS 2015项目 [英] How to publish VS 2015 project with sqlserver database

查看:242
本文介绍了如何使用sqlserver数据库发布VS 2015项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法谷歌这个。



我需要发布我的Windows窗体应用程序项目,该项目有一个microsoft sql server数据库。



我能够发布它并在另一台计算机上安装该项目,但数据库未随其发布。如何发布包含数据库的项目?



这是错误:



建立与SQL Server的连接时发生与网络相关或特定于实例的错误。服务器未找到或无法访问。验证实例名称是否已连接,并且SQL Server已配置为允许远程连接。 (提供者:SQL网络接口,错误26 - 错误位置服务器/实例指定)



BTW,我使用的是Visual Studio 2015,Microsoft SQL服务器2016年和SAP Crystal Reports。



我尝试过:



我试图搜索谷歌如何解决我的问题但无济于事。我需要帮助。 Thnx!

I was unable to google this.

I need to publish my windows form application project that has a microsoft sql server database.

I was able to publish it and install the project in a different computer but the database was not published with it. How do I publish the project with the database included?

Here's the error:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is connect and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error 26 - Error Location Server/Instance Specified)

BTW, i'm using Visual Studio 2015, Microsoft SQL server 2016, and SAP Crystal Reports.

What I have tried:

I tried to search google on how to solve my problem but to no avail. I need help. Thnx!

推荐答案

尝试将其添加为项目的先决条件。

查看以下文档

https://msdn.microsoft.com/en-us/library/7eh4aaa5(v = vs.100).aspx [ ^ ]



如果您在应用文档中描述的步骤时遇到困难,请告诉我。



希望,它帮助:)
Try adding it as prerequisite of your project.
Have a look on the following documentation
https://msdn.microsoft.com/en-us/library/7eh4aaa5(v=vs.100).aspx[^]

In case you find difficulties while applying the steps as described in the documentation, please let me know.

Hope, it helps :)


这篇关于如何使用sqlserver数据库发布VS 2015项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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