Online Documentation for Advanced Data Import for RAD Studio VCL
TQImport3.Execute
function Execute: boolean;
Description
The Execute method is the central method of the collection. It executes the data import from the source file to the DataSet. 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 DataSet properties settings are correct; in case of an error, the exceptions are raised and the method stops being executed, returning false as a result. If all the required properties are set correctly, the method starts its work with generating the OnBeforeImport event. After it, the data import to the dataset is started, and after the importing each record the event OnImportRecord takes place. On completion of the process, the event OnAfterImport is invoked. The import process can be interrupted by Cancel method invocation, in this case the OnImportCancel event is invoked.
See also: