var
i : integer;
j : integer;
EParam : OleVariant;
DocuType : OleVariant;
IMEIEW : _WorkBook;
IMEIES : _worksheet;
dates : string;
name:string;
1/ with adoquery1 do
2/ begin
3/ next;
4/ while not eof do
5/ begin
6/ for j:=0 to adoquery2.FieldCount-1 do
7/ begin
8/ name:=adoquery2.fields.Fields[j].FieldName;
9/ IMEIES.Cells.Item[i+2,j+1]:=adoquery2.fields.Fields[j].AsString;
10/ end;
11/ next;
12/ i:=i+1;
13/ end;
14/ end;单独执行第7或8可以进行,可是一并执行则到8时会出错。请教原因,谢谢!
i : integer;
j : integer;
EParam : OleVariant;
DocuType : OleVariant;
IMEIEW : _WorkBook;
IMEIES : _worksheet;
dates : string;
name:string;
1/ with adoquery1 do
2/ begin
3/ next;
4/ while not eof do
5/ begin
6/ for j:=0 to adoquery2.FieldCount-1 do
7/ begin
8/ name:=adoquery2.fields.Fields[j].FieldName;
9/ IMEIES.Cells.Item[i+2,j+1]:=adoquery2.fields.Fields[j].AsString;
10/ end;
11/ next;
12/ i:=i+1;
13/ end;
14/ end;单独执行第7或8可以进行,可是一并执行则到8时会出错。请教原因,谢谢!
8/ name:=adoquery2.fields.Fields[j].FieldName;
9/ IMEIES.Cells.Item[i+2,j+1]:=adoquery2.fields.Fields[j].AsString;
有什么冲突?