I'm sending a decimal value to a sproc in the following way:
SqlParameter meh = new SqlParameter("Foo", SqlDbType.Decimal);
meh.Value = "0.00001";
meh.Precision = ((System.Byte)(12));
meh.Scale = ((System.Byte)(9));
When I profile the database to see what's being run against it, I see the parameter like so:
....,@Foo decimal(12,9),....,@Foo=10000,....
It seems to be completely mirrored from the decimal point, how do I fix this? Note that I've also tried converting the string to an actual decimal first and using it to set 'meh.Value' but it still has the same problem.
Updated
I've noticed, as in the example above, that the original value has it's decimal point shifted to the right by 9 positions, exactly the same value as the scale. What would cause this?
Updated Again
I should note that I'm using Sql Server 2008