Using Clipper .NTX index files in Delphi projects

<< Click to Display Table of Contents >>

Navigation:  Apollo VCL Components > Installing and Using Apollo VCL >

Using Clipper .NTX index files in Delphi projects

Since Delphi's TDataSet object does not support the use of single-order index files (such as Clipper's .NTX and FoxPro's .IDX) in its IndexName property, Apollo provides this support via the TApolloTable.ExtraIndexes property.

 

Adding your list of .NTX files to the ExtraIndexes list will automatically open them all as the table is opened. This operation is functionally similar to the following Clipper syntax:

 

USE <TableName> INDEX <Ntx1>, <Ntx2>, <Ntx3>, …

 

Alternatively, you can manually open the .NTX files independently using TApolloTable.IndexOpen. For example:

 

ApTbl.Open; 

ApTbl.IndexOpen( 'C:\Apollo\9.9\x64\data\NAME.NTX' );  

ApTbl.IndexOpen( 'C:\Apollo\9.9\x64\data\ADDRESS.NTX' ); 

ApTbl.IndexOpen( 'C:\Apollo\9.9\x64\data\ZIPCODE.NTX' ); 

ApTbl.SetOrder( 1 ); 

 

This would be functionally similar to the following Clipper syntax:

 

USE <TableName>  

SET INDEX TO NAME, ADDRESS, ZIPCODE 

SET ORDER TO 1