Thema: Delphi Export table rows

Einzelnen Beitrag anzeigen

danten

Registriert seit: 19. Feb 2012
Ort: Czech Republic, Prag
126 Beiträge
 
Delphi 10.1 Berlin Architect
 
#1

Export table rows

  Alt 21. Sep 2013, 23:12
Datenbank: Absolute Database • Version: 1 • Zugriff über: 1
Hi all.
Now I deal with the export of table rows entry in the filter, but it is ineffective.
I need to export table rows after 200 rows repeatedly until no Table1.RecordCount = 0.
The file name would be increased by 1.
export1.csv, export2.csv ......
CSVExport = JvDBGridCSVExport
Thank you all for your ideas.
Delphi-Quellcode:
tab1.Filtered := False;
  tab1.Filter := 'Cislo_ID > 0 AND Cislo_ID < 201';
  tab1.Filtered := True;
  CSVExport.FileName := ExtractFilePath(ParamStr(0))+ 'upload/export1.csv';
  CSVExport.Separator := ';';
  CSVExport.ExportGrid;
  tab1.Filtered := False;
  tab1.Filter := 'Cislo_ID > 199 AND Cislo_ID < 401';
  tab1.Filtered := True;
  CSVExport.FileName := ExtractFilePath(ParamStr(0))+ 'upload/export2.csv';
  CSVExport.Separator := ';';
  CSVExport.ExportGrid;
  tab1.Filtered := False;
  tab1.Filter := 'Cislo_ID > 399 AND Cislo_ID < 601';
  tab1.Filtered := True;
  CSVExport.FileName := ExtractFilePath(ParamStr(0))+ 'upload/export3.csv';
  CSVExport.Separator := ';'
  CSVExport.ExportGrid;
Daniel
  Mit Zitat antworten Zitat