第一行的表头已经设好 ,通过ADOQuery查询出的N行,如何将数据从第二行开始放到StringGrid?,,谢谢. Grids.Cells[1,0]:='订单号';
Grids.Cells[2,0]:='款号';
Grids.Cells[3,0]:='颜色';
Grids.Cells[4,0]:='尺码';
Grids.Cells[5,0]:='数量';
Grids.Cells[6,0]:='单位';
Grids.Cells[7,0]:='原因';
Grids.Cells[8,0]:='处理结果';
Grids.Cells[2,0]:='款号';
Grids.Cells[3,0]:='颜色';
Grids.Cells[4,0]:='尺码';
Grids.Cells[5,0]:='数量';
Grids.Cells[6,0]:='单位';
Grids.Cells[7,0]:='原因';
Grids.Cells[8,0]:='处理结果';
解决方案 »
- 使用TMediePlayer播放视频,如何全屏显示图像
- 关于释放Dll的问题?
- 关于paradox数据库的问题?
- 我的软件如果要在各种Windows平台下测试,除了安装多个Windows系统外有无其他办法?
- 散分100!,还不快来!!!!!!!!!!!!
- 如何一次性更新TABEL表的内容?
- 关于XML在做web服务器所调用的DLL时的解析问题
- 有关互斥对象释放问题
- 大家帮帮我啊,谢谢啦,我的分都发光了,没分也有朋友对吗?
- 将用SQL查询的结果保存?
- 请教,通过两个Adoconnection连接两个不同的oracle数据库,如何进行数据查询和数据转移
- 散分了,混了这么久终于要脱掉裤衩了,先提前放分,升星后再放分!!!
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Add('省略......');
ADOQuery1.Open;
ADOQuery1.First;
Grids.RowCount:=ADOQuery1.RecordCount;
while not ADOQuery1.Eof do
begin
for i:=1 to Grids.RowCount do
begin
Grids.Cells[1,j]:=ADOQuery1.fieldbyName('生产订单号').AsString;
Grids.Cells[2,j]:=ADOQuery1.fieldbyName('款号').AsString;
Grids.Cells[3,j]:=ADOQuery1.fieldbyName('颜色').AsString;
Grids.Cells[4,j]:=ADOQuery1.fieldbyName('尺码').AsString;
Grids.Cells[5,j]:=ADOQuery1.fieldbyName('数量').AsString;
Grids.Cells[6,j]:=ADOQuery1.fieldbyName('单位').AsString;
Grids.Cells[7,j]:=ADOQuery1.fieldbyName('原因').AsString;
Grids.Cells[8,j]:=ADOQuery1.fieldbyName('处理结果').AsString;
end
end;
ADOQuery1.next;
j:=j+1;
end;
ADOQuery3.SQL.Clear;
ADOQuery3.SQL.Add('省略......');
ADOQuery3.Open;
ADOQuery3.First;
Grids.RowCount:=ADOQuery3.RecordCount;
while not ADOQuery3.Eof do
begin
for i:=1 to Grids.RowCount do
begin
Grids.Cells[1,i]:=ADOQuery1.fieldbyName('生产订单号').AsString;
Grids.Cells[2,i]:=ADOQuery1.fieldbyName('款号').AsString;
Grids.Cells[3,i]:=ADOQuery1.fieldbyName('颜色').AsString;
Grids.Cells[4,i]:=ADOQuery1.fieldbyName('尺码').AsString;
Grids.Cells[5,i]:=ADOQuery1.fieldbyName('数量').AsString;
Grids.Cells[6,i]:=ADOQuery1.fieldbyName('单位').AsString;
Grids.Cells[7,i]:=ADOQuery1.fieldbyName('原因').AsString;
Grids.Cells[8,i]:=ADOQuery1.fieldbyName('处理结果').AsString;
ADOQuery3.next;
end;
end;
end;
end
end
end;end.
stringgrid1.Refresh;//手动重刷画布