too many actual parameters?

pingping08 2008-03-13 10:44:12
function tformpicture.next(str:string):string;
var i,j:integer;
s:array[1..50] of string;
begin
with form4 do
begin
if adoquery1.Active then adoquery1.Close;
adoquery1.SQL.Clear;
adoquery1.SQL.Add('select * from processgx where sprocesscode='+#39+str+#39);
adoquery1.Open;
//如果是最后一个过程那么退出
if adoquery1.RecordCount=0 then
begin
result:='true';
exit;
end
//后面有一个过程的情况
else if adoquery1.RecordCount=1 then
begin
//察看后面这个过程有没有选
if adoquery2.Active then adoquery2.Close;
adoquery2.SQL.Clear;
adoquery2.SQL.Add('select * from imageunit where suintcode='+#39+adoquery1.Fields[1].asstring+#39);
adoquery2.Open;
//如果没有选的情况
if adoquery2.RecordCount=0 then
begin
//察看该过程是不是必须的
if adoquery1.Fields[5].AsString='是' then
begin
result:='false';
showmessage(adoquery1.fields[4].AsString+'的下道单元过程'+adoquery1.Fields[2].AsString+'没有选');
exit;
end
//下道过程不是必须的情况
else
begin
result:='true';
exit;
end;
end
//下道过程已经选了情况
else
begin
result:='true';
exit;
end;
end
//下道过程有多个的情况
else if adoquery1.RecordCount>1 then
begin
for i:=1 to adoquery1.RecordCount do
begin
adoquery1.RecNo:=i;
if adoquery2.Active then adoquery1.Close;
adoquery2.SQL.Clear;
adoquery2.SQL.Add('select * from imageunit where unitcode='+#39+adoquery1.Fields[1].asstring+#39);
adoquery2.Open;
if adoquery2.RecordCount=0 then
j:=j+1
else //有其中一个过程选了
begin
result:='true';
exit;
end;
end;
//如果下道过程一个都没有选的情况
if (j>1) and (j=adoquery1.RecordCount) then
begin
for i:=1 to adoquery1.RecordCount do
begin
adoquery1.RecNo:=i;
s[i]:=adoquery1.Fields[3].AsString;
end;
for i:=1 to adoquery1.RecordCount do
begin
result:=next(s[i]);
if result='false' then
exit;
end;
end;
end;
end;
end;
result:=next(s[i]);编译这句时提示too many actual parametes,不知是怎么回事?
...全文
1519 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
kufengjoyyy 2010-10-10
  • 打赏
  • 举报
回复
太对了!!
kkx52525 2010-03-25
  • 打赏
  • 举报
回复
HAO
pingping08 2008-03-14
  • 打赏
  • 举报
回复
结帖,楼上的正确
楚人无衣 2008-03-13
  • 打赏
  • 举报
回复
它是与TForm的Next过程冲突了
楚人无衣 2008-03-13
  • 打赏
  • 举报
回复
function tformpicture.next(str:string):string;
把next换成其它函数名再试下,或者其中过程有不必要的参数

5,386

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧