Defining Index Attributes on UNIX and Linux
- Last Updated: October 4, 2020
- 2 minute read
- DataDirect Connectors
- ODBC
- Cloudera Impala 7.1
- dBase 7.1
- Flat files/Text 7.1
- MySQL 7.1
- Pervasive (Btrieve) 7.1
- XML 7.1
- Documentation
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:
-
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]. -
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