开发者

force unicode strings in sql

开发者 https://www.devze.com 2023-02-03 22:24 出处:网络
Is there a way to force sql connection to always 开发者_如何学Cuser \'string\' as unicode string, without manualy adding N prefix (N\'string\')? I\'m using SQL 2008 and i have unicode datatype (nvarch

Is there a way to force sql connection to always 开发者_如何学Cuser 'string' as unicode string, without manualy adding N prefix (N'string')? I'm using SQL 2008 and i have unicode datatype (nvarchar, nchar,...)


No, you always have to use N to denote a unicode string literal.

Or assign the c# (for example) string to the nvarchar parameter (rather than any string concatenation)

0

精彩评论

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