开发者

How to escape the parameter symbol in ADO.NET

We're using ADO.NET with parameterized queries with SQL S开发者_StackOverflow中文版erver using the DBCommand object, so the parameter symbol is @, and things have been working fine. However we now have a query where @ is part of the hard coded data. By default ADO.NET thinks it IS a parameter and the whole thing goes pear shaped.

Is there a way to escape the @ in this one case so it's just treated as part of the data? I tried \@ but that didn't work either.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜