IBX.IBTable.TIBTable.AddIndex

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure AddIndex(const Name, Fields: string; Options: TIndexOptions;
const DescFields: string = '');

C++

void __fastcall AddIndex(const System::UnicodeString Name, const System::UnicodeString Fields, Data::Db::TIndexOptions Options, const System::UnicodeString DescFields = System::UnicodeString());

Properties

Type Visibility Source Unit Parent
procedure
function
public
IBX.IBTable.pas
IBX.IBTable.hpp
IBX.IBTable TIBTable

Description

Creates a new index for the table.

Call AddIndex to create a new index for the table associated with a dataset. The index created with this procedure is added to the database table underlying the dataset. Name is the name of the new index. Fields is a semicolon-delimited list of the fields to include in the index. Options is a potentially restricted set attributes for the index. It can specify that an index

  • Represents the primary index for a dataset. (ixPrimary)
  • Contains no duplicate values (ixUnique).
  • Sorts records in descending order (isDescending).

Warning: Attempting to create an index using options that are not applicable to the table raises an exception.