Advantage TDataSet Descendant
Deletes the given index order.
procedure AdsDeleteIndex( strTag : String );
|
strTag |
Tag of index order to delete. If it is the only index order (tag) in a compound index file or if it is an index order in a non-compound index file, the file will be deleted as well. |
If the index order is a tag in a CDX or ADI, it will be removed. If it is the last tag in the index, the file will be deleted. If the index order is an IDX or NTX, the file will be deleted.
Note It is illegal to delete an index order during a transaction.
AdsTable1.Exclusive := TRUE;
AdsTable1.Active := TRUE;
AdsTable1.AdsCreateIndex( '', 'Tag1', 'LastName;DeptNum', '', '', [] );
{. . . your code here . . .}
AdsTable1.AdsDeleteIndex( 'Tag1' );