Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How would i make a progress meter when querying SQL Ser
Message
De
27/06/2007 12:28:54
Dave Nantais
Light speed database solutions
Ontario, Canada
 
 
À
26/06/2007 18:49:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01235872
Message ID:
01236030
Vues:
13
>I'm not an expert in SQL, but about the only way I can think of is

>1. you need to know the number of records in the table you're querying, and then
>2. add an 'and' clause to your where clause that calls a function that returns .T. In >the function you would increment a counter, and put the progress bar on the screen.

>Thing is, you need to know the total number of records in order to do the percentage >calculation just as you do when you create any progress bar.

I came up with a total hackjob solution. The intense queries resulting in large datasets being passed back to the client usually result in a similiar number of records being returned. Therefore, I am storing in a table the number of records returned and maintaining an 'average number returned' in that table. I use this average to determine a percentage while continually informing the user of the absolute number of records pulled thus far.
Unfortunately, if the number of records pulled is far greater than the average the user will merely see a warning message informing him/her of this and the total number of records pulled continues to increase.

For computing the number of records being pulled from the server I used the technique described in the FAQ provided by Sergey in this thread.


So my message to the user will be something like

" Query 46% Complete : 30,600 records complete "
and i'll add some kind of graphical toolbar
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform