ACC2000: Records Are Not Stored in Expected Physical Order (280049)
The information in this article applies to:
This article was previously published under Q280049 Moderate: Requires basic macro, coding, and interoperability skills.
This article applies only to a Microsoft Access database (.mdb).
SYMPTOMS
When you run a make-table query or programmatically copy the contents of a recordset to another recordset, the records are not always written to the destination table in the order specified by the ORDER BY clause.
CAUSE
The Microsoft Jet database engine does not guarantee the order in which records are physically recorded in the database. If you insert the records to the Jet database engine in a specific order, Jet may not write them in that order. This is because there are multiple caches and levels of caches between your code and the physical disk. Data does not always travel the same path to the physical disk; therefore, the data is not always written in the same order. The ORDER BY clause only controls the order in which records are read.
RESOLUTION
When you open a table or recordset that must reference the data in a specific order, you must use a query that specifies an ORDER BY clause.
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 6/25/2004 |
---|
Keywords: | kbprb KB280049 |
---|
|