title: ASP .NET: SQL Server Money Type and .NET Currency Type
body: <p>MS SQL Server's Money Data Type seems to accept a well formatted currency value with no problem (example: <em>$52,334.50</em>) From my research MS SQL Sever just ignores the <code>$</code> and <code>,</code> characters. ASP .NET has a parameter object that has a <code>Type/DbType</code> property and <code>Currency</code> is an available option to set as a value. However, when I set the parameter <code>Type</code> or <code>DbType</code> to currency it will not accept a value like <em>$52,334.50</em>. I receive an error </p>
  
  <blockquote>
    <p>Input string was not in a correct format.</p>
  </blockquote>
  
  <p>When I try to Update/Insert. If I don't include the <code>$</code> or <code>,</code> characters it seems to work fine. Also, if I don't specify the <code>Type</code> or <code>DbType</code> for the parameter it seems to work fine also. Is this just standard behavior that the parameter object with its Type set to currency will still reject <code>$</code> and <code>,</code> characters in ASP .NET?</p>
  
  <p>Here's an example of the parameter declaration (in the .aspx page):</p>
  
  <pre><code>&lt;asp:Parameter Name="ImplementCost" DbType="Currency" /&gt;
  </code></pre>
  
  <p>So here is a little more information:
  The code snippet that I provided above is part of the Update parameters to an Update command declared for an <em>SqlDatasSource Control</em>. That parameter will update a column (of money type) of a table in my database. The column in my database is bound to a control in a <em>DetailsView control</em>.</p>