title: Why is the decimal SqlParameter getting mangled?
body: <p>I'm sending a decimal value to a sproc in the following way:</p>
  <pre><code>SqlParameter meh = new SqlParameter(&quot;Foo&quot;, SqlDbType.Decimal);
  meh.Value = &quot;0.00001&quot;;
  meh.Precision = ((System.Byte)(12));
  meh.Scale = ((System.Byte)(9));
  </code></pre>
  <p>When I profile the database to see what's being run against it, I see the parameter like so:</p>
  <pre><code>....,@Foo decimal(12,9),....,@Foo=10000,....
  </code></pre>
  <p>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.</p>
  <h3>Updated</h3>
  <p>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?</p>
  <h3>Updated Again</h3>
  <p>I should note that I'm using Sql Server 2008</p>