Solved

Progress Bar + SQL

Posted on 2002-07-18
4
159 Views
Last Modified: 2010-05-02
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
Comment
Question by:baddogi
  • 2
4 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 100 total points
ID: 7162404
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
 
LVL 43

Expert Comment

by:TimCottee
ID: 7162422
No comment and a 'C' grade, I would perhaps have preferred you to wait for some other opinion before accepting with a 'C'.
0
 

Author Comment

by:baddogi
ID: 7162427
Well, it wasn't all too clear and am in kind of a hurry with this.

Sorry I offended you!
0
 

Expert Comment

by:ComTech
ID: 7162717
This grade can and will be changed, thanks to all.

Regards,

ComTech
Community Support Administrator  
Experts-Exchange  
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now