C
ckxw
Unregistered / Unconfirmed
GUEST, unregistred user!
var
sqlstr:string;
floatstr:string;
begin
floatstr:='1.1';
sqlstr:='insert into table1 ( col ) values( '+floatstr+' )';
end;
执行后查看数据库内容,该插入值变为'1',如floatstr值为1.5的话,数据库内为'2',怎样解决可以使插入值就为'1.1'
sqlstr:string;
floatstr:string;
begin
floatstr:='1.1';
sqlstr:='insert into table1 ( col ) values( '+floatstr+' )';
end;
执行后查看数据库内容,该插入值变为'1',如floatstr值为1.5的话,数据库内为'2',怎样解决可以使插入值就为'1.1'