Show: Delphi C++
Display Preferences

Data.DB.TIndexDefs.Add

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure Add(const Name, Fields: string; Options: TIndexOptions);

C++

HIDESBASE void __fastcall Add(const System::UnicodeString Name, const System::UnicodeString Fields, TIndexOptions Options);

Properties

Type Visibility Source Unit Parent
procedure
function
public
Data.DB.pas
Data.DB.hpp
Data.DB TIndexDefs

Description

Creates a new index definition and adds it to the Items property.

Add is provided for backward compatibility. The recommended way to add new index definitions before creating a table is to use the AddIndexDef method. To add an index to an existing table, use the AddIndex method of the dataset instead. To change the array of indexes when a new index has been added to the dataset, use the Update method instead.

Add creates an index definition and assigns the values passed in the Name, Fields, and Options parameters to the TIndexDef properties of the same names. If an index definition with same name already exists, Add raises an EDatabaseError exception.

See Also


Personal tools
In Other Languages
Previous Versions
Assistance