Versions des environnements
Network:
Windows 2003 Server
>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement