level 8
ooooh_up
楼主
c:=list.Count-1;
with ADOQuery1 do
begin
close;
for I := 1 to c do begin
txt:=list.Strings[i];
SQL.clear;
sql.Add('selete 题目文本 form 三年级 where 题目文本=:a');
parameters.ParamByName('a').Value:=txt;
下面就无法运行,提示:ADOQuery:cannot perform this operation on a closed dataset.
到底该如何写才对?
if RecordCount=0 then begin
SQL.Add('insert into 三年级 (题目文本) values(a)');
parameters.ParamByName('a').Value:=txt;
end;
execsql;
end;
end;
2014年05月16日 11点05分
1
with ADOQuery1 do
begin
close;
for I := 1 to c do begin
txt:=list.Strings[i];
SQL.clear;
sql.Add('selete 题目文本 form 三年级 where 题目文本=:a');
parameters.ParamByName('a').Value:=txt;
下面就无法运行,提示:ADOQuery:cannot perform this operation on a closed dataset.
到底该如何写才对?
if RecordCount=0 then begin
SQL.Add('insert into 三年级 (题目文本) values(a)');
parameters.ParamByName('a').Value:=txt;
end;
execsql;
end;
end;