title: Decimal value 1,5 ends up as 15 in DB - how, why?
body: <p>Greetings good people of the internet:)</p>
  
  <p>I have a string value "1,5" which after Convert.ToDecimal() ends up as 1.5M when looking at it in debugger. So far so good I guess. The decimal value then gets passed to a stored procedure call inside a dataset. The type of parameter I am interested in is defined as NUMBER (7,2) in DB so it should allow for numbers that have digits after decimal separator.</p>
  
  <p>The problem is that somewhere along the line the decimal value looses its separator and joins the precision with scale making up completely new number as indicated in the title of this post. I even tried setting Precision and Scale inside parameters' collection in that stored procedure call to match with DB (7,2), but it it did not help either.</p>
  
  <p>Do you have any idea what may be happening here?</p>
  
  <p>EDIT:</p>
  
  <p>Here is the code that calls the stored proc:</p>
  
  <p><code>CaseFactory.UtilsAdapter.SetCaseAction(DefId, action, doneBy, assignedTo, comment, status,
                      searchStatus, priority, access, relStatus, relStatusFixKit, totalhrs,
                      out Common.RETURN_CODE, out Common.RETURN_TEXT);</code></p>
  
  <p>=> SetCaseAction is just calling stored proc in DB using DataSet mechanics.
  'totalhrs' is the param I am interested in is a decimal 1.5M at this point. I have also checked NLS_NUMERIC_CHARACTERS in Oracle and they are set to ', '</p>
  
  <p>So it uses comma for decimals and space for thousands. Nothing unusual I can see there. Only strange thing may be that '1,5' ends up as '1.5M' with a dot inside after ToDecimal(), which may be interpreted incorrectly. It seems unlikely however, because the regional settings on my server use ',' as decimal separator as well, unless .NET uses some different settings? Really confused.</p>