Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 170
  • Last Modified:

Progress Bar + SQL

I am trying to have a status bar that monitors sql queries.  However, I'm not quite sure how the code would work for the start of the query and end.

Any suggestions would be great....

0
baddogi
Asked:
baddogi
  • 2
1 Solution
 
TimCotteeHead of Software ServicesCommented:
The only way you can achieve anything of this sort is to have your query run asynchronously. To do this you need to do this following:

Use ADO
Declare the recordset/connection using WithEvents
Set the recordset cursorlocation to adUseClient
Use the Recordset_Progress event (or equivalent) to determine the number of records retrieved.

This however cannot tell you ahead of time how many records in total will be retrieved so the best that you can do is estimate this and adjust your progress bar maximum dynamically as records are retrieved.
0
 
TimCotteeHead of Software ServicesCommented:
No comment and a 'C' grade, I would perhaps have preferred you to wait for some other opinion before accepting with a 'C'.
0
 
baddogiAuthor Commented:
Well, it wasn't all too clear and am in kind of a hurry with this.

Sorry I offended you!
0
 
ComTechCommented:
This grade can and will be changed, thanks to all.

Regards,

ComTech
Community Support Administrator  
Experts-Exchange  
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now