当使用SqlParameter进行数据赋值时,如果数据类型是float类型,数据传递执行时值等于10.9添加到数据库就会变成10.89,解决此问题需要将数据类似float转换成decimal 

如:new SqlParameter("@price",Entry.Price)  Entry.Price属性数据类型定义为decimal 

posted on 2016-08-22 15:03  leojon  阅读(592)  评论(0编辑  收藏  举报