FireDAC.Comp.DataSet.TFDDataSet.EditRangeStart

From RAD Studio API Documentation
Jump to: navigation, search

[–] Properties
Type:
procedure
function
Visibility: public
Source:
FireDAC.Comp.DataSet.pas
FireDAC.Comp.DataSet.hpp
Unit: FireDAC.Comp.DataSet
Parent: TFDDataSet

Delphi

procedure EditRangeStart;

C++

void __fastcall EditRangeStart();

Description

Enables changing the starting value for an existing range.

Call EditRangeStart to bring the dataset to the dsSetKey state and change the starting value for an existing range. 

After the call, the application can modify indexed fields. To iterate through them, use the IndexFieldCount and IndexFields properties. Optionally, the value of the KeyFieldCount and/or KeyExclusive properties can be edited. 

After assigning a new starting value, call ApplyRange to activate the modified range.

Example

FDQuery1.IndexFieldNames := 'CUST_NO';
FDQuery1.SetRangeStart;
FDQuery1['CUST_NO'] := 100;
FDQuery1.SetRangeEnd;
FDQuery1['CUST_NO'] := 200;
FDQuery1.ApplyRange;
......
FDQuery1.EditRangeStart;
FDQuery1['CUST_NO'] := FDQuery1['CUST_NO'] + 1;
FDQuery1.ApplyRange;

See Also