c# - truncated decimal point number inserted incorrect into mssql -
i have width , height in centimeter , calculate area :
var res = ((width * height) / 10000); (divided 10000 create meter)
the problem :
i want insert result microsoft sqlserver table , truncate point part of number 2 digit :
res = math.truncate(res * 100) / 100; then insert table,if input 2 number 216 , 152 result 3.28, till here ok but,when check result in database see : 3.280000002 truncate in store procedure :
round(area,2) but did not solve problem.
c# sql-server winforms
No comments:
Post a Comment