ACC: dBASE Unique Index Does Not Behave as Expected (163279)
The information in this article applies to:
- Microsoft Access 2.0
- Microsoft Access for Windows 95 7.0
- Microsoft Access 97
This article was previously published under Q163279 Moderate: Requires basic macro, coding, and interoperability skills.
SYMPTOMS
If you choose a unique field when you link a dBASE table, the index
contains only records that are unique with respect to the given index
expression. For example, a .dbf file may contain "n" records, while the
unique index may contain "m" entries, where "n" does not equal "m." This
means that when the database is viewed by a UNIQUE index, it may appear to
have fewer records then it actually does.
CAUSE
There is no concept of primary indexes in dBASE. All indexes are taken as
secondary indexes. The dBASE command SET UNIQUE ON limits only which
records are displayed.
RESOLUTION
One way to prevent this scenario is to SET UNIQUE OFF and REINDEX in dBASE.
This will allow all records to be displayed. Another solution is not to
choose a unique field when you link the dBASE table. A third solution is to
manually edit the INF file that is created when you link a dBASE table.
Following are examples of the INF file.
Contains Unique Field:
[dBASE III]
NDX1=C:\ACCESS\SAMPLES\city.ndx
[UIDX1 city#idx]
NDX1=C:\ACCESS\SAMPLES\city.ndx
Without Unique Field:
[dBASE III]
NDX1=C:\ACCESS\SAMPLES\city.ndx
REFERENCES
For more information about linking XBase files, search the Help Index for
for "dBASE."
dBASE is manufactured by Borland, a vendor independent of Microsoft; we
make no warranty, implied or otherwise, regarding this product's
performance or reliability.
| Modification Type: | Major | Last Reviewed: | 5/9/2003 |
|---|
| Keywords: | kb3rdparty kbprb KB163279 |
|---|
|