EPUB | CHM | PDF

Example: EditRangeStart, EditRangeEnd, FieldByName, ApplyRange

Top Previous Next

To get result set where Company field value lays between Edit1 and Edit2:

with Customer do
begin
  EditRangeStart;
  FieldByName('Company').AsString := Edit1.Text;
  //Set start range based on text of Edit1 component
  EditRangeEnd;
  FieldByName('Company').AsString := Edit2.Text;
  // Set end range based on value of Edit2 component
  ApplyRange; // Apply the ranges
end;