程序流程图这样:
用Query1查找ISBN号等于Edit1.text的记录,并按照ISBN号和册数进行排序, |
|
是否有记录____no_____>edit2.text:=1;
|
|yes
设置变量Int_sum=1,Query1.first
|
|
----->Int_sum和册数进行比较,是否相等-no---其他操作
|
| (循环) | |
| |yes
---------int_sum增1,Query1.next
用Query1查找ISBN号等于Edit1.text的记录,并按照ISBN号和册数进行排序, |
|
是否有记录____no_____>edit2.text:=1;
|
|yes
设置变量Int_sum=1,Query1.first
|
|
----->Int_sum和册数进行比较,是否相等-no---其他操作
|
| (循环) | |
| |yes
---------int_sum增1,Query1.next
begin
close;
sql.text:='the sql';
open;
if recordcount = 0 then
edit2.text:=1
else
begin
int_sum=1;
first;
while not eof do
begin
if int_sum=fieldbyname("册数").asinteger then
//other code
else
begin
Int_sum = int_sum+1;
next;
end;
end;
end;
end;