C#中的SQL Server错误40 [英] SQL SERVER ERROR 40 in C#

查看:182
本文介绍了C#中的SQL Server错误40的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在VS 2010中完成了Krypton项目.并且有一个在MSSQL 2005 Express中创建的数据库.该项目具有多个数据网格视图和数据集.我已经使用数据集视图使用数据集显示了一些数据,而没有任何编码,只需配置数据网格视图即可.我的项目正在运作.但是,当我使用inno设置软件创建了一个安装文件并在另一台PC中创建数据库并运行该安装文件并安装了该文件时,某些界面可以正常工作,但是包含数据网格视图的显示器显示了

"An error has occurred while establishing a connection to the server when connecting to SQL server 2005, this failure may be caused by the fact that under default settings SQL server does not allow remote connection. ( provider: Named Pipes Provider, error: 40 – could not open a connection to SQL server. "
请帮助我,我遇到了很大的麻烦.我应该完成这项作业. :(

我在Internet ant中搜索了此错误,并做了很多配置,但仍然无法解决.给我一些解决方案.

I have done Krypton project in VS 2010. And there is a data base which created in MSSQL 2005 express. The project has several data grid views and data sets. I have displayed Some data using data grid view using data sets without any coding just configure the data grid view. My project is working. but when i created a setup file using inno setup software and create the data base in another pc and run that setup file and installed it some interface are working but interfaces which contain data grid view dosent display and it displays

"An error has occurred while establishing a connection to the server when connecting to SQL server 2005, this failure may be caused by the fact that under default settings SQL server does not allow remote connection. ( provider: Named Pipes Provider, error: 40 – could not open a connection to SQL server. "
Please help me i''m in a big trouble. I should finish this assignment. :(

i searched this error in internet ant have done lot of configurations but still couldn''t fix it. give me some solution.

推荐答案

请在这里看看:
Please, have a look here: Named Pipes Provider, error 40...[^]


基本上,听起来您尚未在SQL Server数据库上启用命名管道.这是一篇将告诉您如何操作的文章:

http://geekswithblogs.net/TimH/archive/2006/01/30/67586.aspx [ ^ ]
Basically, it sounds like you have not enabled Named Pipes on your SQL Server database. Here is an article that will tell you how to do so:

http://geekswithblogs.net/TimH/archive/2006/01/30/67586.aspx[^]


这篇关于C#中的SQL Server错误40的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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