M
majie_zhb
Unregistered / Unconfirmed
GUEST, unregistred user!
var A,C,B:integer
for A:=0 to cb2.Items.Count-1 do
begin
with query_add do
begin
close;
sql.Text:='select prct_model,sum(st_num) as st_num,st_remark from '+
'stock where prct_model='
+quotedstr(cb2.Items[A])+' group by prct_model,st_remark';
open;
end;
for C:=A to query_add.RecordCount-1 do //C:=A这块A的值传不到C里面去??
begin
for B:=0 to query_add.FieldCount-1 do
begin
stringGrid1.Cells[B,C+1]:=query_add.Fields.AsString;
query_add.Next;
end;
end;
end;
for A:=0 to cb2.Items.Count-1 do
begin
with query_add do
begin
close;
sql.Text:='select prct_model,sum(st_num) as st_num,st_remark from '+
'stock where prct_model='
+quotedstr(cb2.Items[A])+' group by prct_model,st_remark';
open;
end;
for C:=A to query_add.RecordCount-1 do //C:=A这块A的值传不到C里面去??
begin
for B:=0 to query_add.FieldCount-1 do
begin
stringGrid1.Cells[B,C+1]:=query_add.Fields.AsString;
query_add.Next;
end;
end;
end;