AnyDAC
ContentsIndexHome
PreviousUpNext
TADDataSet.EditRangeStart Method

Enables changing the starting value for an existing range.

Group
Links

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

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

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

procedure EditRangeStart;
ADQuery1.IndexFieldNames := 'CUST_NO';
ADQuery1.SetRangeStart;
ADQuery1['CUST_NO'] := 100;
ADQuery1.SetRangeEnd;
ADQuery1['CUST_NO'] := 200;
ADQuery1.ApplyRange;
......
ADQuery1.EditRangeStart;
ADQuery1['CUST_NO'] := ADQuery1['CUST_NO'] + 1;
ADQuery1.ApplyRange;
What do you think about this topic? Send feedback!