mssql中小数位是5位,且可以在表中输入5位小数,数据库应该没有问题
在delphi中,
fieldbyname('hjje').AsString:=edit10.Text;
edit10.Text内容为5位,正常,showmessage出来是5位,
但dm.q_am_tz.post; 后,存到数据库中就最多只有4位,晕了.
在delphi中,
fieldbyname('hjje').AsString:=edit10.Text;
edit10.Text内容为5位,正常,showmessage出来是5位,
但dm.q_am_tz.post; 后,存到数据库中就最多只有4位,晕了.
q_am_tz这个数据集也没有指定小数位数.
然后
EnableBCD:=False再添加数据上去就可了。
EnableBCD:=FalseDelphi帮助是这么写的:
This is because TBCDField uses the currency data type that has a fixed scale of 4 decimal places.
BCD字段类型使用了货币类型,这种类型是小数点后是4位数。