I just found in some code that it uses System.Data.SqlTypes.SqlString? I haven't seen it used before. Am I always supposed to use this when sending a string to sql server?
e.g.
cmd.Parameters.Add("@FirstName", (SqlString)FirstName);
No, it's fine - you can just use string and the framework/driver will take care of things for you.
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