Einzelnen Beitrag anzeigen

nobby

Registriert seit: 1. Sep 2004
12 Beiträge
 
#1

StringGrid Begrenzung bei ca. 1 Mio Zeilen ?

  Alt 11. Nov 2008, 06:58
Hallo

Ich versuche ein StringGrid mit Daten zu füllen. Ab einer bestimmten Anzahl Zeilen bekomme ich eine EAccessViolation. Die Begrenzung scheint bei ca. 1 Mio. rows zu liegen (1024 * 1024). Hat jemand eine Ahnung, ob man diese Begrenzung umgehen kann? Ich habe ca. 4 Mio. Datensätze zum laden.

Code:
procedure TForm2.Button1Click(Sender: TObject);
const
  ROW_LIM = 1024 * 1024;
var
  i: Integer;
begin
  StringGrid1.RowCount := ROW_LIM + StringGrid1.FixedRows;
  Label1.Caption := 'Row count: ' + IntToStr(StringGrid1.RowCount);
  Application.ProcessMessages;
 
  try
    for i := StringGrid1.FixedRows to ROW_LIM do
      StringGrid1.Cells[0, i] := IntToStr(i);
  except
    on E: Exception do Label1.Caption := E.Message + ' at row ' + IntToStr(i);
  end;
end;
Besten Dank für jegliche Hinweise,
Nobby
  Mit Zitat antworten Zitat