From Appmethod Libraries
Jump to: navigation, search

Object Pascal

function AddIndexDef: TIndexDef;


TIndexDef* __fastcall AddIndexDef(void);


Type Visibility Source Unit Parent
function public
Data.DB TIndexDefs


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

Call AddIndexDef to add index definitions when creating a database table. AddIndexDef returns the new TIndexDef object that was added to the IndexDefs collection of index definitions. After calling AddIndexDef, set the properties of the newly added TIndexDef object to specify the name, type, and options of index that will be created.

Note: AddIndexDef is only valid in the context of creating index definitions for a table to be created with a subsequent call to the CreateTable or CreateDataSet method. It cannot be used to add indexes to an already-existing table.

See Also

Code Examples