16 The dBASE Driver : Defining Index Attributes on UNIX and Linux

Defining Index Attributes on UNIX and Linux
Index files for dBASE contain index tags for each index that exists for a database file. These index tags can be marked as unique, that is, the driver will ensure that no duplicate values exist for the columns that define the index tag. The unique attribute is not natively supported by the dBASE or FoxPro products. The enforcement and recognition of the unique attribute is an extension of the dBASE driver. The driver must be notified that index tags are unique. No configuration is needed for unique indexes that were created using the DataDirect Connect for ODBC dBASE driver. When using files that were not created with the dBASE driver, you must define unique index tags as outlined in the following procedure.
In the directory where the database and index files are located, use any text editor, such as vi, to define or edit the QEDBF.INI as follows:
1
Create a [filename] section where filename is the name of the database file. This entry is case-sensitive and the file extension must be included, for example, [accts.dbf].
2
In the [filename] section, specify the number of unique indexes on the file (NUMUNIQUE=) and the index specifications (UNIQUE#=index_filename,index_tag). The index_tag can be determined by calling the ODBC function SQLStatistics and examining the INDEX_NAME result column.
For example, to define two unique indexes on the accts.dbf database file, the QEDBF.INI would be defined as:
[accts.dbf]
NUMUNIQUE=2
UNIQUE0=accts.mdx,ACCT_NAME
UNIQUE1=accts.mdx,ACCT_ID