float i = (float)Convert.ToDouble(textBox1.Text);
and insert number 12,3 in my table I have following number 12.30000000000032324!
What I must to do with this conversion and have in my table number 12,3?
Hi,
although this is not a C# forum, you should take a look at the Help for a more precise datatype than float.
http://msdn2.microsoft.com/en-us/library/b1e65aza.aspx
In addition see the float definition in the BOL for more information about float in SQL Server.
You might want to have a look on the decimal type instead.
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
No comments:
Post a Comment