【发布时间】:2018-05-11 10:43:15
【问题描述】:
我是新手开发者。我在尝试从我的计算机连接到 SQL Server 到服务器时遇到问题。
在建立与 SQL Server 的连接时发生与网络相关或特定于实例的错误。
服务器未找到或无法访问。验证实例名称是否正确以及 SQL Server 是否配置为允许远程连接。 (提供者:SQL 网络接口,错误:26 - 错误定位服务器/指定的实例)
我已经搜索了发布它的方式,并找到了许多解决方案。但没有一个对我有用。你能帮帮我吗?
这是我的连接字符串
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;";
最后,这些是对我不起作用的解决方案的一些参考:
- https://www.lansweeper.com/kb/174/a-network-related-or-instance-specific-error-occurred.html
- https://support.solarwinds.com/Success_Center/Network_Performance_Monitor_(NPM)/Exception_A_network_related_or_instance_specific_error_while_establishing_a_connection_to_SQL_Server
- Why am I getting "Cannot Connect to Server - A network-related or instance-specific error"?
- Why did a network-related or instance-specific error occur while establishing a connection to SQL Server?
【问题讨论】:
-
为什么连接字符串有两行??
标签: c# asp.net sql-server winforms connection-string