Records appear out of order
-
Our application reads information from a Jet database distributed as part of the program. We have recently added a new block of records to the database. They appear in Access in the order that we expect, but our application returns an assorted few of the records first, followed by the rest in order. We are still using the MFC interface to DAO, now through MFC 7.1. We read the database using the MFC/DAO MoveFirst and MoveNext calls. The SQL query is "( [SECT_TYPE_NUM] = 70 )", checking a single field.
-
Our application reads information from a Jet database distributed as part of the program. We have recently added a new block of records to the database. They appear in Access in the order that we expect, but our application returns an assorted few of the records first, followed by the rest in order. We are still using the MFC interface to DAO, now through MFC 7.1. We read the database using the MFC/DAO MoveFirst and MoveNext calls. The SQL query is "( [SECT_TYPE_NUM] = 70 )", checking a single field.
Andrew Hain wrote: They appear in Access in the order that we expect Ordered by which column? Do you define the query with "order by" statement? Like "SELECT * FROM your_table ORDER BY your_table_id". Marc Soleda. ... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
-
Andrew Hain wrote: They appear in Access in the order that we expect Ordered by which column? Do you define the query with "order by" statement? Like "SELECT * FROM your_table ORDER BY your_table_id". Marc Soleda. ... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.
Thank you. I am still mystified at how we got away without that for years.
-
Thank you. I am still mystified at how we got away without that for years.
Andrew Hain wrote: Thank you. I am still mystified at how we got away without that for years. Actually, I got away with something similar. While I had the table opened in Access I hit the sort button on the toolbar so after that the records appeared to be always sorted. Somehow it worked for a while and I thought that I didn't have to write a single line of code to keep the records sorted. Well, it stopped working at some point. :) Time is the fire in which we burn.