ACC2: Unexpected Query Results with Attached xBASE Table (132012)
The information in this article applies to:
This article was previously published under Q132012
Moderate: Requires basic macro, coding, and interoperability skills.
SYMPTOMS
When you run a select query based on an attached Microsoft FoxPro or dBASE
table with the criteria applied to an indexed field designated as the
unique record identifier, the Microsoft Access version 2.0 Service Pack
produces unexpected query results. For example, the query returns only 1
record instead of all the records that match the criteria applied to the
unique record identifier field.
CAUSE
If the unique record identifier field contains duplicate values, the
Microsoft Jet database engine version 2.5 returns the first record that
matches the criteria in the query.
NOTE: This behavior differs from the Jet database engine version 2.0 that
was shipped with Microsoft Access version 2.0. The Jet database engine
version 2.0 returns all the records that match the specified criteria in
the unique record identifier field, not just the first matched record.
RESOLUTION
To work around this behavior, re-attach the table without a unique record
identifier, and then run the query again. To do so, follow these steps:
- In your database, delete the attachment to the FoxPro or the dBASE
table.
- Re-attach the table and specify an index file. In the Select Unique
Record Identifier dialog box, click Cancel to avoid specifying a
unique identifier.
- Run the select query again. Note that you receive all the records
you expect instead of only 1 record.
STATUS
This behavior is by design.
REFERENCES
For more information about attaching tables, search for "Attach Table," and
then "Attach Table Command (File Menu)" using the Microsoft Access Help
menu.
Modification Type: | Major | Last Reviewed: | 7/5/2002 |
---|
Keywords: | kb3rdparty kbprb KB132012 |
---|
|