Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Records appear out of order

Records appear out of order

Scheduled Pinned Locked Moved Database
databasec++json
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Andrew Hain
    wrote on last edited by
    #1

    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.

    M 1 Reply Last reply
    0
    • A Andrew Hain

      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.

      M Offline
      M Offline
      Marc Soleda
      wrote on last edited by
      #2

      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.

      A 1 Reply Last reply
      0
      • M Marc Soleda

        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.

        A Offline
        A Offline
        Andrew Hain
        wrote on last edited by
        #3

        Thank you. I am still mystified at how we got away without that for years.

        T 1 Reply Last reply
        0
        • A Andrew Hain

          Thank you. I am still mystified at how we got away without that for years.

          T Offline
          T Offline
          Toni78
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups