2,507
社区成员




对不起,少了一个 Edit
procedure TForm3.Button2Click(Sender: TObject);
begin
adoquery1.Close; //等同于 adoquery1.Active:=false;
adoquery1.SQL.Clear;
adoquery1.SQL.Add('select * from fs where xh="'+dbtext1.Caption+'"');
adoquery1.open; //等同于 adoquery1.Active:=true;
if str <>'' then
begin
adoquery1.Edit;
adoquery1.FieldByName('str').AsString:=str;
adoquery1.Post;
end;
end;
procedure TForm3.Button2Click(Sender: TObject);
begin
adoquery1.Close; //等同于 adoquery1.Active:=false;
adoquery1.SQL.Clear;
adoquery1.SQL.Add('select * from fs where xh="'+dbtext1.Caption+'"');
adoquery1.open; //等同于 adoquery1.Active:=true;
if str <>'' then
begin
adoquery1.FieldByName('str').AsString:=str;
adoquery1.Post;
end;
end;
procedure TForm3.Button2Click(Sender: TObject);
begin
adoquery1.Close;
adoquery1.SQL.Clear;
adoquery1.SQL.Add('select * from fs where xh="'+dbtext1.Caption+'"');
adoquery1.open;
adoquery1.Edit;
if str <>'' then
adoquery1.FieldByName('str').AsString:=str;
end;