Choosing data type for prices: I have problem with 1,23 becoming 123http://forums.asp.net/t/1154595.aspx/1?Choosing+data+type+for+prices+I+have+problem+with+1+23+becoming+123Tue, 04 Sep 2007 19:26:15 -040011545951892345http://forums.asp.net/p/1154595/1892345.aspx/1?Choosing+data+type+for+prices+I+have+problem+with+1+23+becoming+123Choosing data type for prices: I have problem with 1,23 becoming 123 <p>Hi,</p> <p>I am setting up an MS access database table in my asp.net application that will keep prices and have some problems regarding decimal numbers.</p> <p>To do some testing I have a table with three&nbsp;different field data types:<br> 1) data type Number/Decimal<br> 2) data type Number/Single<br> 3) data type Currency</p> <p>I try to update and insert data using Gridview and Formview controls. My problem is that only the field defined as Number/Single works as I need.<br> That is, when I enter 1,23 the value stored in the data base is also 1,23.<br> The other two fields (defined as Number/Decimal and Currency) works as follows: I enter 1,23 but the value stored in the data base is 123.&nbsp;<br> I would have thought that the Currency format was the most natural one to use, but now I am confused.</p> <p>I am&nbsp;developing locally on my laptop using&nbsp;MS Visual Web Developer 2005 Express Edition. I run Windows XP with regional settings defining the comma sign as the decimal separator.<br> Also the asp.net page&nbsp; is setup as&nbsp; <font size="2">&lt;%</font><font color="#0000ff" size="2">@</font><font size="2"> </font><font color="#a31515" size="2">Page</font><font size="2"> </font><font color="#ff0000" size="2">Language</font><font color="#0000ff" size="2">=&quot;VB&quot;</font><font size="2"> </font><font color="#ff0000" size="2">Culture</font><font color="#0000ff" size="2">=&quot;da-DK&quot;</font><font size="2">%&gt;</p> </font> <p>I would appreciate&nbsp;if someone could help me understand why the &quot;decimals disappear&quot; and also what would be the &quot;best&quot; number data type to use for storing prices (with decimals).</p> <p>&nbsp;</p> 2007-09-04T19:26:15-04:00