FireDAC.Comp.Client.TFDTable.IndexName

From RAD Studio API Documentation
Jump to: navigation, search

[–] Properties
Type: property
Visibility: published
Source:
FireDAC.Comp.Client.pas
FireDAC.Comp.Client.hpp
Unit: FireDAC.Comp.Client
Parent: TFDTable

Delphi

property IndexName;

C++

__property IndexName = {default=0};

Description

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

FireDAC.Comp.Client.TFDTable.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