Controls automatic maintenance of Index'es.
Use IndexesActive to indicate whether the dataset should maintain the data views, defined by the Indexes collection.
When IndexesActive is False, the dataset does not maintain the data views. That avoids the overhead of updating views, while data is fetched or is edited. When IndexesActive is True (by default), the dataset maintains the data views.
To selectively enable and disable data views rather than turning them all on or off at once, use the Active property of individual TADIndex objects. These objects are available through the Indexes property.
property IndexesActive: Boolean;
var lPrevIndsActive: Boolean; ... lPrevIndsActive := ADQuery1.IndexesActive; ADQuery1.IndexesActive := False; try // perform updates here, without maintaining client views finally ADQuery1.IndexesActive := lPrevIndsActive; end;
What do you think about this topic? Send feedback!