Navigation:  Advantage .NET Data Provider > AdsExtendedReader Class > AdsExtendedReader Methods >

AdsExtendedReader.Reindex

Advantage .NET Data Provider

Previous pageReturn to chapter overviewNext page

Rebuilds all open indexes.

public void Reindex();

public void Reindex( int iPageSize );

Remarks

Reindex requires exclusive use of the open indexes. A reindex will rebuild all keys in all open index orders for the table. It is unlikely that reindexing will be necessary if only Advantage applications are using data. If other applications not using Advantage are using data, however, there is a possibility for index corruption to occur. Reindexing occurs automatically when calls are made to PackTable and ZapTable. Calling Reindex on a CDX or ADI index that contains a custom index order will results in all keys being removed from the custom index order.

IPageSize is the page size to use when reindexing tables of type ADT. It is ignored for tables of TableType NTX, VFP, and CDX. Valid values are any numeric value in the range ADS_MIN_ADI_PAGESIZE to ADS_MAX_ADI_PAGESIZE. If no size is given, then the default page size of 512 bytes will be used. Refer to Index Page Size for more information. Note that if the table is in an Advantage Data Dictionary, then only the administrator connection can be used to change the page size when reindexing a table.

Note Calling Reindex inside a transaction is illegal.

 

Note Reindex operates only on tables. The use of a cursors with Reindex is illegal and will result in an exception.

See Also

OpenIndex

CreateIndex

Progress

ProgressMessage

Cancel