连接字符串中的问题 [英] problem in connection string
本文介绍了连接字符串中的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在调试C#2008中的连接字符串中声明datasource =.\ sqlexpress时遇到问题,它给出了错误
无法识别的转义序列"我正在使用SQL Server 2005
I am facing a problem when I declare datasource=.\sqlexpress" in connection string in C # 2008 in debugging it gives error
"unrecognized escape sequence" I am using SQL server 2005
推荐答案
如果通过源设置连接字符串,则可能与"\"字符有关代码.
只需尝试@"datasource=.\sqlexpress"
即可.
This might have something to do with the "\" character if you are setting a connetion string through the source code.
Just try@"datasource=.\sqlexpress"
instead.
这篇关于连接字符串中的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文