• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 167
  • 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
 
TimCotteeCommented:
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
 
TimCotteeCommented:
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

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

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