N
nydelphi
Unregistered / Unconfirmed
GUEST, unregistred user!
var<br> str1,str2,str3:string;<br> str4:Currency;<br> str5:integer;<br>begin<br> str1:=ADOQuery1MenuName.AsString;<br> str2:=ADOQuery1MenuUnit.AsString; <br> str3:=ADOQuery1MenuType.AsString;<br> str4:=ADOQuery1MenuPrice.AsCurrency;<br> no:=10000;<br> with adoquery2 do<br> begin<br> close;<br> sql.Clear;<br> sql.Text:='INSERT INTO jiezhang (memuname,memuclass,memutype,menuprice) VALUES('''+str1+''','''+str2+''',,'''+str3+''','''+str4+''')';<br> ExecSQL;<br><br><br>编译时 为什么还是说incompatible types:'string' and 'currency' <br><br>数据库中memupric为货币类型