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. ADO asynchronous queries and sorting

ADO asynchronous queries and sorting

Scheduled Pinned Locked Moved Database
databasequestionalgorithmstutorial
2 Posts 2 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.
  • B Offline
    B Offline
    Byteman
    wrote on last edited by
    #1

    I have a stored procedure that executes too slowly (as I mention in a previous posting) so I'm thinking of executing the query asynchronously and grabbing the results as they come back. it may give the impression that the query is faster than it really is. my question is... the stored procedure is sorting the results. So if I grab the first few items from the recordset doing something simple like "MoveNext" and then the queries inserts items new items before the cursor because of sorting, I've missed those items. I am just beginning to dig into asynchronous querys so this may be a really stupid question, in fact I'm sure it is, but I've yet to see how to deal with sorting. Any suggestions?

    S 1 Reply Last reply
    0
    • B Byteman

      I have a stored procedure that executes too slowly (as I mention in a previous posting) so I'm thinking of executing the query asynchronously and grabbing the results as they come back. it may give the impression that the query is faster than it really is. my question is... the stored procedure is sorting the results. So if I grab the first few items from the recordset doing something simple like "MoveNext" and then the queries inserts items new items before the cursor because of sorting, I've missed those items. I am just beginning to dig into asynchronous querys so this may be a really stupid question, in fact I'm sure it is, but I've yet to see how to deal with sorting. Any suggestions?

      S Offline
      S Offline
      SimonS
      wrote on last edited by
      #2

      Once SQL starts the good ol' TDS stream, I'd presume that the records are correct (i.e. SQL won't return rows to you that aren't in the right order). Is it not possible to break up the stored proc. into smaller units? What kind of app is this for? Cheers, Simon "Sign up for a chance to be among the first to experience the wrath of the gods.", Microsoft's home page (24/06/2002)

      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