以下是引用louchanghong在2022-4-6 14:15:05的发言:
NextRecordSet从网上查 可能要用这个。但是如何判断是最后一个
procedure TForm_main.btn3Click(Sender: TObject);
var
R: integer;
fld_value:string;
begin
with qry1 do
begin
Close;
SQL.Text := ' select :aa as aa ; select :bb as aa ; select :cc as aa ';
Parameters.ParamByName('aa').Value:='aa';
Parameters.ParamByName('bb').Value:='bb';
Parameters.ParamByName('cc').Value:='cc';
Open;
R:=1;
fld_value:=qry1.Fields[0].Value;
ShowMessage(fld_value);
Recordset:= NextRecordSet(R);
fld_value:=qry1.Fields[0].Value;
ShowMessage(fld_value);
Recordset:= NextRecordSet(R);
fld_value:=qry1.Fields[0].Value;
ShowMessage(fld_value);
Recordset:= NextRecordSet(R);
fld_value:=qry1.Fields[0].Value;
ShowMessage(fld_value);
end
end;