楼主: hphubei

c# Winform 连接 sql server 2005 的问题

[复制链接]
论坛徽章:
8
11#
 楼主| 发表于 2007-3-28 11:21 | 只看该作者
现在在其他客户端访问的错误就是这个:

用 sql server 2000 的时候是没有问题的

databaseerror.jpg (36.31 KB, 下载次数: 18)

databaseerror.jpg

使用道具 举报

回复
论坛徽章:
8
12#
 楼主| 发表于 2007-3-28 13:59 | 只看该作者
有人能帮帮我么,急啊

使用道具 举报

回复
论坛徽章:
8
13#
 楼主| 发表于 2007-3-28 15:27 | 只看该作者
I am waiting for suggestions and it is urgent.

使用道具 举报

回复
论坛徽章:
8
14#
 楼主| 发表于 2007-3-28 15:27 | 只看该作者
Errors connecting to SQL Server Express 2005
Are you getting errors connecting to SQL Server Express 2005 via remote client software and yet have no problem connecting to it on the local machine?
Some of the errors you might be seeing are:
•        sql server does not allow remote connections
•        SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified
•        An error has occured while establishing a connection to the server. When connecting to SQL Server 2005,this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.(provider:Named Pipes Provider,error:40-Could not open connection to SQL Server))
•        Server does not exist or access denied
If yes, then read on because SQL Server Express 2005 is not automatically configured for remote access during installation. It can be enabled however, so the problems you are having are more of a "feature" than a bug.
Why this page?Well, we too ran into this problem - just as you have now. In recognition of all of the kind help we received from the Internet newsgroups we thought it might be useful to collect the information here so as to provide assistance to others in the same position. If you have any suggestions for updates to this page please let us know

使用道具 举报

回复
论坛徽章:
8
15#
 楼主| 发表于 2007-3-28 15:29 | 只看该作者
Here's a quick summary of the actions you need to take. The first three actions have a separate page which provides more details and some screen shots of the procedure.
1.        [Link] Enable the TCP/IP protocol using the Surface Area Configuration Utility
2.        [Link] Make sure the TCP/IP protocol is enabled in the SQL Server Configuration Utility
3.        [Link] Make sure the SQL Server browser is started. Note this step is optional. It is possible to set the SQL Server instance to use a fixed IP address - but this is non-standard for named instances. See sqlexpress's WebLog for details.
4.        Make sure SQL Server and SQL Server Browser are exempted by the firewall on the server machine. This is done by putting sqlservr.exe and sqlbrowser.exe as an exception in the windows firewall.
5.        Note: In order to get things to work. You might need to completely reboot the server machine after making the changes. There have been reports (thanks P.C.) that starting and stopping the SQL Server and Browser software is not enough.

使用道具 举报

回复
论坛徽章:
8
16#
 楼主| 发表于 2007-3-28 15:38 | 只看该作者
网上看到有人遇到同样的问题,解决办法是:

1: 启用数据库CLR支持
--***********************************************
EXEC sp_configure 'show advanced options','1';
go
reconfigure;
go
EXEC sp_configure 'clr enabled','1'
go
--***********************************************
2: 更改数据库信任模式(为正确添加到程序集)
TRUSTWORTHY { ON | OFF }
ON
使用模拟上下文的数据库模块(例如,用户定义函数或存储过程)可以访问数据库以外的资源。

OFF
模拟上下文中的数据库模块不能访问数据库以外的资源。
--***********************************************
Alter Database 数据库名称
SET TRUSTWORTHY ON
--***********************************************


可是这个办法对我的问题没有作用

使用道具 举报

回复
论坛徽章:
8
17#
 楼主| 发表于 2007-3-28 16:35 | 只看该作者
烦恼啊,网上找了一天的资料了,依然没有解决方案

使用道具 举报

回复
论坛徽章:
8
18#
 楼主| 发表于 2007-3-28 17:01 | 只看该作者
http://www.sql-server-performanc ... p;method=TopicQuote

做了,好像还是没有作用,我要疯了

使用道具 举报

回复
论坛徽章:
8
19#
 楼主| 发表于 2007-3-28 18:35 | 只看该作者
奇怪,在家里的另外一台电脑上面又是另外一个错误了:

databaseerror3.jpg (42.76 KB, 下载次数: 19)

databaseerror3.jpg

使用道具 举报

回复
论坛徽章:
8
20#
 楼主| 发表于 2007-3-28 18:42 | 只看该作者
server=WCS-MARK\SQLEXPRESS;initial catalog=xxx;user id=sa;password=xxx;Integrated Security=SSPI; Trusted_Connection=true;Connect Timeout=30;


这是我的连接字符串,问题出现在哪里那?

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表