Convert .net decimal type to tsql decimal(3,3)
ado.net, c#, sql-server
Solution
Maximum value `decimal(3,3)` will allow is `0.999`, so when you try to insert something larger than that exception will occur. try something like `decimal(4,3)`
Problem
I have stored procedure which gets decimal(3,3) as param. So, when I'm trying to pass this param like this ``` new SqlParameter { ParameterName = "@Wear", SqlDbType = SqlDbType.Decimal, Value = wear.WearValue } ``` I'm getting Error converting data type numeric to decimal. This exception appears when I try to pass 1.0 value. I need to convert 1.0 exactly to `decimal(3,3)`. How can I perform this?