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 DbType.AnsiString
instead of DbType.String
.
Why would you use DbType.AnsiString
instead of DbType.String
?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With