如何打包用c#和sql编写的软件在另一台计算机上运行? [英] how to packaged software written in c # and sql to run on another computer ?

查看:86
本文介绍了如何打包用c#和sql编写的软件在另一台计算机上运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用c#和数据库sql编写的软件。当我打包并在另一台计算机上安装它时使用的是win xp。要运行的软件,然后它不会加载数据库和错误无法连接到数据库。请帮我解决这个问题。

I have a software written in c # and database sql. When I pack and install it on another computer is using win xp. software to run on, then it does not load up the database and the error "Can not connect to database". please help me solve this problem.

推荐答案

您需要验证以下几点:

You need to verify the points listed below:

1)听起来您尝试访问的实例是SQL Express。在这种情况下,实例将被称为 myserver \sqlexpress SQLEXPRESS 文字;案例无关紧要) 。 myserver不适用于命名实例; myserver \sqlexpress可能会成功。



2)你必须使用SQL配置工具启用TCP / IP(安装MSSQL和SSMS时安装)。



3)你应该关闭防火墙(蛮力 - 如果你不需要,就不要这样做)或者在防火墙中启用MSSQL(MSSQL是默认情况下未启用)

1) It sounds like the instance you're trying to reach is SQL Express. In which case the instance will be called myserver\sqlexpress ("SQLEXPRESS" literal; case doesn't matter). "myserver" won't work with a "named instance"; "myserver\sqlexpress" might do the trick.

2) You MUST enable TCP/IP with the SQL Configuration tool (installed when you installed MSSQL and SSMS).

3) You should turn off the firewall (brute force - don't do it if you don't have to) or enable MSSQL in the firewall (MSSQL is not enabled by default)





或者您可以阅读如何解决连接到SQL Server数据库引擎的问题 [ ^ ]。



另读类似文章:

错误消息:无法连接到SQL Server数据库e [ ^ ]

SQL SERVER - 修复:错误:1326无法连接到数据库服务器错误:40 - 无法打开到SQL Server的连接 [ ^ ]





- Amy



Or you can read How to Troubleshoot Connecting to the SQL Server Database Engine[^].

Also read similar articles:
Error Message: Cannot Connect to SQL Server Database[^]
SQL SERVER – Fix : Error : 1326 Cannot connect to Database Server Error: 40 – Could not open a connection to SQL Server[^]


--Amy


这篇关于如何打包用c#和sql编写的软件在另一台计算机上运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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