开发者

Explicitly casting all string parameters to Unicode

Is there a performance hit to prefixing all SP parameters with N' even when the parameter is not a unicode string?

I'm generating calls to a database dynamically in my .net code. Without actually checking each time I generate the code, I don't know which parameters are Unicode.

If the 开发者_StackOverflow社区answer is yes (there is a performance hit), what's the simplest way to check whether a paramter is unicode?


No, there isn't. If your column is Unicode you should always pass in a Unicode string.

However you shouldn't need to prefix strings from your .NET application with N. Are you not using parameterized statements?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜