Solved

Progress Bar + SQL

Posted on 2002-07-18
4
161 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

830 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