with adoquery1 do begin close; sql.clear; sql.add('select * from table where a=1'); open; end; if adoquery1.recordcount>0 then begin showmessage(adoquery1.fieldbyname('a').asstring); end;
with adoquery1 do begin Active := False sql.text := 'select * from table where a=1'; Active := True; if recordcount>0 then First; while not Eof do begin 这里面你就写你要的数组赋值; Next; end; end;
begin
close;
sql.clear;
sql.add('select * from table where a=1');
open;
end;
if adoquery1.recordcount>0 then
begin
showmessage(adoquery1.fieldbyname('a').asstring);
end;
begin
Active := False
sql.text := 'select * from table where a=1';
Active := True;
if recordcount>0 then
First;
while not Eof do
begin
这里面你就写你要的数组赋值;
Next;
end;
end;