Home  >  Article  >  Database  >  DataContext 连接SqlServer2008 出现40错误

DataContext 连接SqlServer2008 出现40错误

WBOY
WBOYOriginal
2016-06-07 15:39:441474browse

@Launcher:嗯,貌似对象资源器管理可以连上服务器,但是代码 dgv_customers.DataSource = from c in Customers where c.CustomerID.StartsWith("3") select new { 顾客ID = c.CustomerID, 顾客名称 = c.Name, 顾客地址 = c.City }; 报SqlException错误: 在

@Launcher: 嗯,貌似对象资源器管理可以连上服务器,但是代码

dgv_customers.DataSource = from c in Customers
                                       where c.CustomerID.StartsWith("3")
                                       select new { 顾客ID = c.CustomerID, 顾客名称 = c.Name, 顾客地址 = c.City };

报SqlException错误:

在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且 SQL Server 已配置为允许远程连接。 (provider: 命名管道提供程序, error: 40 - 无法打开到 SQL Server 的连接)

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn