I send the decimal value to sproc as follows:
SqlParameter meh = new SqlParameter("Foo", SqlDbType.Decimal);
meh.Value = "0.00001";
meh.Precision = ((System.Byte)(12));
meh.Scale = ((System.Byte)(9));
When I look at a database to see what works with it, I see a parameter like this:
....,@Foo decimal(12,9),....,@Foo=10000,....
It seems to be completely mirrored from the decimal point, how can I fix this? Note that I also tried to convert the string to the actual decimal digit first and use it to set βmeh.Valueβ, but it still has the same problem.
Update
I noticed, as in the above example, that the original value has a decimal point shifted to the right by 9 positions, exactly the same value as the scale. What can cause this?
Updated again
I should note that I am using Sql Server 2008