将xueli字段中的空值替换为6,结果是替换了,但出现错误信息"键列信息不足或不正确.更新影响到多行",
adods1.Open;
for i:=0 to adods1.RecordCount-1 do
begin
if varisnull(adods1.FieldByName('XueLi').Value) then
begin
adods1.Edit;
adods1.FieldByName('XueLi').Value:='6';
adods1.Post;
end;
if not adods1.Eof then adods1.Next;
end;
adods1.Close; 咋回事儿呢???
adods1.Open;
for i:=0 to adods1.RecordCount-1 do
begin
if varisnull(adods1.FieldByName('XueLi').Value) then
begin
adods1.Edit;
adods1.FieldByName('XueLi').Value:='6';
adods1.Post;
end;
if not adods1.Eof then adods1.Next;
end;
adods1.Close; 咋回事儿呢???
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货