"就是select...from...的结果传递给参数。"
??????
不能那样传值的
得这样
var
s:string;j:integer;
begin
j:=0;
with query1 do
begin
close;
sql.clear;
sql.add('select * from table where 姓名="abc"');
open;
end;
for i:=0 to query1.RecordCount do
begin
s[j]:= Query1.FieldByName('姓名').AsString;
inc(j);
end;
end;