While not Query.Eof do begin
SG.Cells[0,i] := Query1.FieldByName('field1').AsString;
SG.Cells[1,i] := Query1.FieldByName('field2').AsString;
SG.Cells[2,i] := Query1.FieldByName('field3').AsString;
SG.Cells[3,i] := Query1.FieldByName('field4').AsString;
i := i +1;
end;
쿼리한 결과를 스트링 그리드로 올리려면 루프를 돌리면 될것같은데요
.
.
.
Query1.Open;
i := 0;
While not Query.Eof do begin
SG.Cells[0,i] := Query1.FieldByName('field1').AsString;
SG.Cells[1,i] := Query1.FieldByName('field2').AsString;
SG.Cells[2,i] := Query1.FieldByName('field3').AsString;
SG.Cells[3,i] := Query1.FieldByName('field4').AsString;
i := i +1;
end;
그럼 즐프하세요....