StringGrid1.Options:=StringGrid1.Options+[goEditing];
  ADOQuery1.First;
  StringGrid1.Cells[0,0]:='合同号';
  StringGrid1.Cells[1,0]:='条目号';
  StringGrid1.Cells[2,0]:='零件号';
  StringGrid1.Cells[3,0]:='采购单位';
  StringGrid1.Cells[4,0]:='发料单位';
  StringGrid1.Cells[5,0]:='转换比例';
  StringGrid1.RowCount:=ADOQuery1.RecordCount+1;
  for i:=1 to ADOQuery1.RecordCount do
  begin
    for  j:=0 to ADOQuery1.FieldCount-1 do
    begin
      StringGrid1.Cells[j,i]:=ADOQuery1.Fields[j].AsString;
    end;
    ADOQuery1.Next;
  end; 
posted on 2008-12-05 16:12  yxbsmx  阅读(176)  评论(0编辑  收藏  举报