Online Documentation for Advanced Data Export for RAD Studio VCL
TQExport4.Execute
procedure Execute; virtual;
Description
The Execute method is the central method of the collection. It executes the export of source data to file. Of course, for each descendant class the method is defined in its own way, but the logics of the work remains the same for all the components. In case of the invocation, the function checks if the FileName and ExportSource (and the corresponding DataSet, DBGrid, ListView, StringGrid or CustomSource) properties are correct; in case of an error, the exceptions are raised and the method stops executing, returning false as a result. If all the required properties are set correctly, the method starts its work with generating the OnBeginExport event. Then the data export to file begins, and after the export of each record the event OnExportedRecord event takes place. On completion of the process, the event OnEndExport is invoked. The export can be interrupted by Abort method invocation, in this case the OnStopExport event handler is invoked. At the same time, it is guaranteed that even in case of export interruption the output file will still exist in a readable form for the corresponding software product.
See also: