FireDAC.Comp.Client.TFDMetaInfoQuery.IndexName

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property IndexName;

C++

__property IndexName = {default=0};

Properties

Type Visibility Source Unit Parent
property published
FireDAC.Comp.Client.pas
FireDAC.Comp.Client.hpp
FireDAC.Comp.Client TFDMetaInfoQuery

Description

Gets or sets the current index for the dataset by its name.

FireDAC.Comp.Client.TFDMetaInfoQuery.IndexName inherits from FireDAC.Comp.DataSet.TFDDataSet.IndexName. All content below this line refers to FireDAC.Comp.DataSet.TFDDataSet.IndexName.

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';

See Also