我是如何解决这个错误的。 SQL错误40 [英] How I solve this error. SQL error 40

查看:259
本文介绍了我是如何解决这个错误的。 SQL错误40的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个程序 VS.  2010 结合视觉基本项目 一个DLL 来自 c#。问题 我的电脑工作正常但 我运行它另一台电脑上我收到以下错误。 

发生了与网络相关的特定于实例的错误,而建立连接 SQL Server。服务器找到 无障碍。验证实例名称 正确 SQL Server 配置 允许远程连接。 (提供商:命名管道提供商,错误: 40 - 可能 打开连接 SQL Server)




我更改了服务器名称 连接字符串 名称机器 我希望 运行它。

然而总是发生相同的错误。 verique sql 所有服务正在运行好

解决方案





看看这里:

网络相关或特定于实例建立与SQL Server的连接时发生错误。找不到服务器或无法访问服务器。 [ ^ ]

在MS SQL Server 2008中获取错误与SQL Server建立连接时发生网络相关或特定于实例的错误...的另一个原因 [ ^ ]

http://blog.sqlauthority.com/2009/05/21/sql-server- fix-error-provider-named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server-microsoft-sql-server-error / [ ^ ]

http://stackoverflow.com/questions/5435090/sql-server-was-not-found-or-was - 无法访问 [ ^ ]

http://stackoverflow.com/questions/18060667/connect-to-server-a-network-related-or-instance-specific-error [ ^ ]


检查co连接字符串和/或用户角色与其他计算机运行程序的数据库无关。 。 。



错误:40 - 无法打开与SQL Server的连接与程序专用服务器的连接有关

希望它会有所帮助。 。

I am developing a program in VS.2010 combining visual basic project with a DLL from c #.  the problem is that my PC works fine but when I run it on another pc I get the following 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 correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)




I gave change the server name in the connection string for the name of the machine on which I want to run it.

however always happens the same error. verique and sql and all services are running well

解决方案

Hi,

Have a look here:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible.[^]
Another reason for getting the error "A network-related or instance-specific error occurred while establishing a connection to SQL Server…" in MS SQL Server 2008[^]
http://blog.sqlauthority.com/2009/05/21/sql-server-fix-error-provider-named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server-microsoft-sql-server-error/[^]
http://stackoverflow.com/questions/5435090/sql-server-was-not-found-or-was-not-accessible[^]
http://stackoverflow.com/questions/18060667/connect-to-server-a-network-related-or-instance-specific-error[^]


Check on connection string and/or User role un other machine's database where ur program is running. . .

error: 40 - Could not open a connection to SQL Server is something to do with the connection of program's dedicated server
hope it will help. . .


这篇关于我是如何解决这个错误的。 SQL错误40的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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