xHarbour Reference Documentation > Function Reference |
Retrieves the default index file extension in a work area.
IndexExt() --> cFileExtension
The function returns the default file extension for index files in a work area. If a work area is unused, the return value is an empty string ("").
The default extension for index files depends on the RDD used to open a database file. IndexExt() returns the default extension used by the RDD if an index file should be created and the file name is specified without extension. IndexExt() does not return the file extension of an index file in use.
Note: The function exists for compatibility reasons. It is recommended to use OrdBagExt() instead.
See also: | DbInfo(), IndexKey(), IndexOrd(), OrdBagExt() |
Category: | Database functions , Index functions |
Source: | rdd\rddord.prg |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example checks the existence of an index file using // the default file extension for indexes. PROCEDURE Main USE Customer NEW EXCLUSIVE IF .NOT. File( "Cust01" + IndexExt() ) INDEX ON Upper(LastName+FirstName) TO Cust01 ENDIF USE RETURN
http://www.xHarbour.com