|
self.ADOQuery1.Active:=false;
self.ADOQuery1.SQL.Clear;
sqlstr:='select * from projectdonghua where pid='+inttostr(pid)+' order by did';
self.ADOQuery1.SQL.Add(sqlstr);
try
self.ADOQuery1.Open;
except
self.ADOQuery1.ExecSQL;
end;
self.ADOQuery1.First;
for i:=1 to self.ADOQuery1.RecordCount do
begin
self.ADOQuery1.Edit;
self.ADOQuery1.FieldByName('DID').AsInteger:=i;
self.ADOQuery1.Post;
showmessage(self.ADOQuery1.fieldbyname('did').AsString);
self.ADOQuery1.next;
end;
当时显示DID都更新过来了,但实际数据库中的记录却没更新过来,用ADOQuery1断开在查一次还是和原来的一样,请问是哪里出了问题啊,谢谢 |
|