AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Export table rows

Ein Thema von danten · begonnen am 21. Sep 2013 · letzter Beitrag vom 23. Sep 2013
 
Benutzerbild von sx2008
sx2008

Registriert seit: 15. Feb 2008
Ort: Baden-Württemberg
2.332 Beiträge
 
Delphi 2007 Professional
 
#3

AW: Export table rows

  Alt 22. Sep 2013, 14:04
Delphi-Quellcode:
const BSIZE = 200;

....
CSVExport.Separator := ';'; // moved outside of the loop because we need so set the separator only once
for i := 0 to (tab1.RecordCount div BSIZE) + 1 do
begin
  tab1.Filtered := False;
  // note: lower margin is included and upper margin is excluded
  // 0..199 (200 records)
  // 200..399 (200 records)
  tab1.Filter := 'Cislo_ID >='+ QuotedStr(i*BSIZE) + ' AND Cislo_ID < '+ QuotedStr((i+1)*BSIZE);
  tab1.Filtered := True;
  if tab1.IsEmpty then
    break; // stop export if there are no more records
  CSVExport.FileName := ExtractFilePath(ParamStr(0))+ 'upload/export'+IntToStr(i+1)+'.csv';
  CSVExport.ExportGrid;
end;
fork me on Github

Geändert von sx2008 (22. Sep 2013 um 23:50 Uhr) Grund: bugfix
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 07:11 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz