M
monkey_cn
Unregistered / Unconfirmed
GUEST, unregistred user!
高手我快崩溃了,以下代码一直出现record cannot be located for updating since it was last read 错误,能否帮忙解决一下? ( 积分: 200 )<br />高手我快崩溃了,以下代码一直出现record cannot be located for updating since it was last read 错误,
能否帮忙解决一下?
for i:=1 to NullItemCount do
begin
IdCan:=MatList[NullList].MatID;
if DM.T_ForPscDetail.Locate('原料ID',IdCan,[]) then
begin
if DM.T_ForPscDetail.State&lt;&gt;dsEdit then
DM.T_ForPscDetail.edit;
DM.T_ForPscDetail.FieldByName('需要量').AsFloat:=x;
DM.T_ForPscDetail.Post;
end;
end;
if FItemCount&gt;0 then //只有有填充物时候,才执行
begin
IdCan:=FMatList[FNullList[1]].MatID;
if DM.T_ForPscDetail.Locate('原料ID',IdCan,[]) then
begin
if DM.T_ForPscDetail.State&lt;&gt;dsEdit then
DM.T_ForPscDetail.edit;
DM.T_ForPscDetail.FieldByName('需要量').AsFloat:=fx;
DM.T_ForPscDetail.Post;
end;
end;
能否帮忙解决一下?
for i:=1 to NullItemCount do
begin
IdCan:=MatList[NullList].MatID;
if DM.T_ForPscDetail.Locate('原料ID',IdCan,[]) then
begin
if DM.T_ForPscDetail.State&lt;&gt;dsEdit then
DM.T_ForPscDetail.edit;
DM.T_ForPscDetail.FieldByName('需要量').AsFloat:=x;
DM.T_ForPscDetail.Post;
end;
end;
if FItemCount&gt;0 then //只有有填充物时候,才执行
begin
IdCan:=FMatList[FNullList[1]].MatID;
if DM.T_ForPscDetail.Locate('原料ID',IdCan,[]) then
begin
if DM.T_ForPscDetail.State&lt;&gt;dsEdit then
DM.T_ForPscDetail.edit;
DM.T_ForPscDetail.FieldByName('需要量').AsFloat:=fx;
DM.T_ForPscDetail.Post;
end;
end;