XBaseIndexesCollection.Add
Syntax:
Parameters:
<Name> (required)
Name of index being created. Only Latin index names of up to 10 characters are supported.
<Expression> (required)
Index expression.
<Unique> (optional)
Unique flag for the index being created. True - unique; False - non-unique.
Default value: False.
<Descending> (optional)
Defines whether or not the index being created is descending. True - descending; False - ascending.
Default value: False.
<Filter> (optional)
Index filter expression.
Default value: ".T.".
Description:
Availability:
Example:
xB = New xBase; xB.Fields.Add("CODE", "S", 5); xB.Fields.Add("NAME", "S", 40); // Add index by the CODE field: xB.Indexes.Add("IDXCODE","CODE", True); xB.CreateFile("c:\test.dbf", "c:\test.cdx"); |