Hi,
I'm using TcsvDataSet just to save it as CSV file. (I know DBExport package, but just want to install minimum).
Only when this procedure is executed there are memory blocks not released as in the attached file. Not sure whether this is DB issue or LCL issue.
bdsSampleList is TBufDataSet. I'm not using TCSVDataSet directly because other parts were done with TBufDataSet (recently found SavetoCSVFile procedure).
procedure TSampleList.mniSaveClick(Sender: TObject);
var
csv: TCSVDataSet;
begin
if sd1.Execute then begin
csv:= TCSVDataSet.Create(nil);
with csv do begin
CopyFromDataset(bdsSampleList);
CSVOptions.FirstLineAsFieldNames:= True;
SaveToCSVFile(sd1.FileName);
end;
FreeAndNil(CSV);
ShowMessage('SampleList exported');
end;
end;