I am looking at code written by someone else.

Everywhere it uses DbType.AnsiString instead of DbType.String. Why?

有帮助吗?

解决方案

DbType.AnsiString is a legacy data type. It handles 8-bit characters rather than Unicode characters.

At the risk of being snarky, your question is kind of like asking "why were the spark plugs in my 1996-model car designed with 1994 design standards?"

Like somebody said, you may need to look through the database schemas and existing code base, or ask somebody, to figure this out.

Maintaining old code and data is a vital part, and the hardest part, of the software developer's profession.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top