Delphi Database, Delphi Components from ComponentAce
Products Download Order Contact us
TABSAdvIndexDef.DescFields
TABSAdvIndexDef
Top 


Specifies the fields of the index that are sorted in descending order.

property DescFields: String;

Description
Set DescFields to a string that lists the names of fields in the index, separated by semicolons. The ordering imposed by the index on the fields specified in DescFields is descending. Fields in the index definition but not in the DescFields list use the default ascending order. It is possible for a single index to have fields using both ascending and descending ordering.

For a field to be included in DescFields, the field must be included in the fields on which the index is based. These fields are specified in the Fields property of the TIndexDef object.

In the example below, the DescFields property is given a list of two table fields for the index being created: TransDate and Company.

with ABSTable1 do begin
  ...
  with AdvIndexDefs do begin
    with AddIndexDef do begin
      Name := 'MultiIndex'

      Fields := 'TransDate;Company;State'

      Options := [ixUnique];
    end;
    Items[IndexDefs.Count - 1
].DescFields := 'TransDate;Company';
  end;
  ...
  CreateTable;
end;

   
        © 2003 - 2024 ComponentAce  | .net zip component | barcode for .net | delphi zip component | delphi database Nov 22, 2024