Your application can obtain information about server-defined indexes from all table type datasets. To obtain a list of available indexes for the dataset, call the GetIndexNames method. GetIndexNames fills a string list with valid index names. For example, the following code fills a listbox with the names of all indexes defined for the CustomersTable dataset:
CustomersTable.GetIndexNames(ListBox1.Items);
CustomersTable->GetIndexNames(ListBox1->Items);
var I: Integer; ListOfIndexFields: array[0 to 20} of string; begin with CustomersTable do begin for I := 0 to IndexFieldCount - 1 do ListOfIndexFields[I] := IndexFields[I].FieldName; end; end;
AnsiString ListOfIndexFields[20]; for (int i = 0; i < CustomersTable->IndexFieldCount; i++) ListOfIndexFields[i] = CustomersTable->IndexFields[i]->FieldName;
Specifying an Index with IndexName
Creating an Index with IndexFieldNames
GetIndexNames
GetIndexNames
GetIndexNames
GetIndexNames
GetIndexNames
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|