Hi
I have created an xmlport object and I can download an XML type file with all the records of the table.
My table has 10,000 records and I need to send XML files with 2,000 records until I complete 10,000 records.
How can I generate the 5 files iterating from 2,000 to 2,000?
I think the algorithm is something like this but I'm not sure, is there another way to do it?
The "Year" and "FormatNo" are Key from the table.
DMM_DetalleTable.SetFilter("DMM_AñoDeclaracion", '%1', Rec."Year");
DMM_DetalleTable.SetFilter(DMM_FormatNo, Rec.FormatNo);
if DMM_CXPDetalleTable.Find() then
repeat
copy to tmpTable
if conunt = 2000 then begin
TempBlob.CreateOutStream(MyOutStream);
Xmlport.Export(60101, MyOutStream, tmptable);
TempBlob.CreateInStream(MyInStream);
outputFileName := 'myNameFile.XML';
DownloadFromStream(MyInStream, '', '', '', outputFileName);
clear(tmpTable)
conunt=0;
end;
conunt= conunt+1;
until DMM_CXPDetalleTable.Next() = 0;