C#: DbType.String versus DbType.AnsiString

前端 未结 4 1449
时光说笑
时光说笑 2021-02-04 00:32

I have taken over some C# code.

The code is hitting a database with some SQL which uses parameters.

All of the string parameters are typed as

4条回答
  •  粉色の甜心
    2021-02-04 01:08

    AnsiString
    A variable-length stream of non-Unicode characters ranging between 1 and 8,000 characters.

    String
    A type representing Unicode character strings.

    In database:

    nchar and nvarchar is unicode

    char and varchar is non-unicode

提交回复
热议问题