获取错误:建立与SQL Server的连接时发生与网络相关或特定于实例的错误 [英] Getting error: A network-related or instance-specific error occurred while establishing a connection to SQL Server

查看:96
本文介绍了获取错误:建立与SQL Server的连接时发生与网络相关或特定于实例的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新手开发人员.尝试从计算机到服务器计算机连接到SQL Server时遇到问题.

I'm newbie developer. I have a problem trying to connect to SQL Server from my computer to server machine.

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

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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

我已经搜索了发布它的方法,并且找到了许多解决方案.但是没有人为我工作.你能帮我吗?

I've searched the way to issue it and I'm found many solution. But none are working for me. Could you please help me?

这是我的连接字符串

string constring = @"Data Source=137.xx.xx.xxx\\SQLEXPRESS;Initial Catalog=EDI_HR;User ID=sa;Password=1234;";

string constring = @"Data Source=CISXXXXXX\SQLEXPRESS;Initial Catalog=EDI_HR;User ID=sa;Password=1234;";

最后,这些是对我不起作用的解决方案的一些参考:

Finally, those are some of the references of a solution that don't work for me:

推荐答案

尝试一下:

string constring = @"Data Source=137.xx.xx.xxx\\SQLEXPRESS;Initial Catalog=EDI_HR;Integrated Security =True";

这篇关于获取错误:建立与SQL Server的连接时发生与网络相关或特定于实例的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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