FilterIf: IExpression;
The FilterIf property returns condition of loading of records from data provider.
To provide correct work of the condition, set the IDtObject.Metabase property.
Executing the example requires the D:\res_export.txt file in the file system.
Contents of the file res_export.txt
Add links to the Dal, Dt, Metabase system assemblies.
Sub UserProc;
Var
mb: IMetabase;
TextProvider: IDtTextProvider;
v: Array;
i: Integer;
Errors: IDtErrors;
Error: IDtError;
Begin
mb := MetabaseClass.Active;
// Create object for import from text file
TextProvider := New DtTextProvider.Create;
// Determine imported file
TextProvider.File := "D:\res_export.txt";
// Set export parameters
TextProvider.FormatType := DtTextFormatType.Delimited;
TextProvider.DelimitedColumnDelimiter := ";";
TextProvider.DelimitedTextQualifier := """";
After executing the example import from the D:\res_export.txt file is set up. The rows, in which value if the Value attribute is greater than 2.8, are imported. Information about import and import errors is output to the console window.
See also: