SQL SERVER2005連接字串中的@3/29
来源:互联网 发布:强网速的软件 编辑:程序博客网 时间:2024/05/22 05:05
下載了祭司的Client-CallBack參考程式碼,在連接SQL SERVER2005時,將其中的
SqlConnection conn = new SqlConnection("data source=.;initial catalog=Northwind;user id=sa;password=test");
改為
SqlConnection conn = new SqlConnection("Data Source=DAISYLH/SQLEXPRESS;Initial Catalog=Northwind;Integrated Security=True;Pooling=False");
時在DAISYLH/S處出現:無法辨認的溢出序列
若將DAISYLH/去掉,則出現:
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 the default settings SQL Server does not allow remote
connections. (provider: Named Pipes Provider, error: 40 - Could not
open a connection to SQL Server)
真是奇怪了,後來在這裏找到了解決方法,原來加一個@就正常了^__^
SqlConnection conn = new SqlConnection(@"Data Source=DAISYLH/SQLEXPRESS;Initial Catalog=Northwind;Integrated Security=True;Pooling=False");
注:以上是C#的寫法,VB.NET則不需要@
- SQL SERVER2005連接字串中的@3/29
- SQL Server2005中的SMO编程
- SQL Server2005中的SMO编程
- SQL Server2005中的Service Broker
- SQL Server2005 中的数据类型总结
- SQL Server2005 中的数据类型总结
- SQL Server2005 中的权限管理
- SQL Server2005中的IAM链
- SQL Server2005 中的权限管理
- SQL SERVER2005 中的权限管理
- SQL Server2005 中的数据类型总结
- SQL Server2005 中的数据类型总结
- sql server2005登录选项中的服务器名
- T9输入法在SQL Server2005 中的实现
- 问卷调查在SQL Server2005 中的实现
- 修改SQL Server2005数据库中的逻辑文件名
- SQL Server2005中的聚集索引必定唯一
- SQL SERVER2005 中的SA登录失败解决方法
- VLAN简介
- 微软日文输入法
- 我在网上见到的一篇文章,深有同感
- 又是一本AJAX的书
- 网易,你怎么了。为什么如此让国人伤心、愤怒??
- SQL SERVER2005連接字串中的@3/29
- tomcat的wap服务器设置
- COM组件设计与应用12 - 错误与异常处理
- COM组件设计与应用13 - 事件和通知(VC6.0)
- COM组件设计与应用14 - 事件和通知(vc.net)
- 悟性,程序员的天赋
- COM组件设计与应用15 - 连接点(vc6.0)
- COM组件设计与应用16 - 连接点(vc.net)
- 微软的正则表达式教程(一):正则表达式简介