FireDAC.Comp.DataSet.TFDDataSet.IndexName
Delphi
property IndexName: String read FIndexName write SetIndexName;
C++
__property System::UnicodeString IndexName = {read=FIndexName, write=SetIndexName};
Contents
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | public | FireDAC.Comp.DataSet.pas FireDAC.Comp.DataSet.hpp |
FireDAC.Comp.DataSet | TFDDataSet |
Description
Gets or sets the current index for the dataset by its name.
Use IndexName to specify the current index for the dataset.
If IndexName is empty, the dataset's sort order is based on the IndexFieldNames property or on the dataset's default ordering. If IndexName contains the name of a valid index from the Indexes collection, then that index is used to determine data view (including sort order) of records.
IndexFieldNames and IndexName are mutually exclusive. Setting one clears the other.
Example
with FDMemTable1.Indexes.Add do begin
Name := 'by_name';
Fields := 'NAME;DT';
Active := True;
end;
FDMemTable1.IndexName := 'by_name';