Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to implement a progress bar while running a remote v
Message
De
05/05/2021 16:34:25
Walter Meester
HoogkarspelPays-Bas
 
 
À
05/05/2021 16:04:56
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., Nouvelle Zélande
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01680151
Message ID:
01680178
Vues:
42
>>> -- but it all depends upon the backend. I have stuff that is querying bunch of tables with over a billion records in them -- so it's going to take a sec or two no matter how well the indexes are designed and database tuning is done.
>
>Especially if your app allows customers to perform ad hoc queries; you're going to get table scans that can take many seconds or even minutes in large databases.
>
>FWIW, we tried an image control with one of those fancy rotating "working" gifs, but that also tended to freeze during ODBC querying, presumably because single-threaded VFP is set not to yield to waiting ActiveX or gifs. Perhaps the VFPX Asynchronous project has an answer; display a gif in its own thread and it should swirl merrily away. However, KG made the point that a gif that swirls attractively forever after something went bad in the query, isn't a lot of use either. I might raise it with Chuanbing to see whether VFP can be persuaded to yield via an event or whatever while it sits and waits for ODBC... the user just needs to know it's not actually stalled but working hard.

With asynchronous connections, you can do exactly that. I've got a search dialog that searches patients through an asynchronous query and displaying a animated GIF and at the same time being able to cancel out the search is perfectly possible and not even that difficult.

However it does take some special care, such as testing whether the query has completed at regular intervals through a timer and running on an dedicated asynchronous connection.

Walter,
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform