RAD Studio VCL Reference
TIndexDefs.Add Method

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

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

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. 


Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!