force unicode strings in sql
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)
精彩评论