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,不知是怎么回事?
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,不知是怎么回事?
解决方案 »
- Amount shr 16如果Amount是Float类型,怎么解决?
- DELPHI写的DLL被别的开发工具调用时提示错误:
- WORD在软件内部使用与窗外打开的操作
- 可以动态改变CHART的图形样式吗,
- 在timage控件里放 从数据库字段里取出的数据碰到问题
- 菜鸟求一段程序
- 请问各位,我记得有一个可以记录操作,制作成视频的软件我忘了叫什么了,那位大虾能告诉我呢?
- 跳出内部循环
- 如何说服我的学生学DELPHI而不学C++?他是职专的。
- delphi调用excel
- 怎么通过程序锁定EXCEL某个单元格
- 50分只求: Windows socket error: 远程主机强迫关闭了一个现有的连接. 10054 On API 'recv' 的异常名 E 是什么啊?
把next换成其它函数名再试下,或者其中过程有不必要的参数