if(radiobutton1.Checked)then
adoquery4.SQL.Add('update his_clrk set yfje=yfje+:myjzse where fph1='+''''+fph+'''')
else
adoquery4.SQL.Add('update his_clck set jfse=jfse+:myjzse where fph1='+''''+fph+'''');
end;
adoquery4.Parameters.ParamByName('myjzse').Value:=myjzse;
adoquery4.ExecSQL;
我这样写,怎么程序运行不正常!有时候,修改数据正确,但是几率很低,大部分时候,更新数据为空了,我的数据库定义jfse,yfje为float类型,myjzse,在delphi中定义为double类型,这是怎么回事啊?帮帮我啊!已经弄了几天了!!!
adoquery4.SQL.Add('update his_clrk set yfje=yfje+:myjzse where fph1='+''''+fph+'''')
else
adoquery4.SQL.Add('update his_clck set jfse=jfse+:myjzse where fph1='+''''+fph+'''');
end;
adoquery4.Parameters.ParamByName('myjzse').Value:=myjzse;
adoquery4.ExecSQL;
我这样写,怎么程序运行不正常!有时候,修改数据正确,但是几率很低,大部分时候,更新数据为空了,我的数据库定义jfse,yfje为float类型,myjzse,在delphi中定义为double类型,这是怎么回事啊?帮帮我啊!已经弄了几天了!!!
adoquery4.close;
adoquery4.sql.clear;
adoquery4.SQL.Add('update his_clrk set yfje=yfje+:myjzse where fph1='+''''+fph+'''')
else
adoquery4.SQL.Add('update his_clck set jfse=jfse+:myjzse where fph1='+''''+fph+'''');
end;
adoquery4.Parameters.ParamByName('myjzse').Value:=myjzse;
adoquery4.ExecSQL;
adoquery4.close;
adoquery4.sql.clear;
你说的那样我写了,上面是代码的一部分.请问哪位碰到过类似的现象吗?该怎么处理啊!急着呢?
adoquery4.sql.clear;
//adoquery4.Parameters.ParamByName('myjzse').Value:=myjzse;
myjzse初始参数有无值??
if(radiobutton1.Checked)then
adoquery4.SQL.Add('update his_clrk set yfje=yfje+:myjzse where fph1='+''''+fph+'''')
else
adoquery4.SQL.Add('update his_clck set jfse=jfse+:myjzse where fph1='+''''+fph+'''');
end;
adoquery4.Parameters.ParamByName('myjzse').Value:=myjzse;
adoquery4.ExecSQL;