Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting the process records in a sql-select statement
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00184105
Message ID:
00184186
Vues:
20
>how can i get the actual processed records in a sql-select statement to populate a progress bar. The sql use 3 tables.

Francisko --

I have gotten this to work with VFP's ActiveX Progress Bar. Please observe the following SQL SELECT and related code:

ProgressBarInit(RECCOUNT('Customer'))
SELECT Customer.*, ;
ProgressBarIncrement() AS DummyCol1 ;
FROM Customer ;
WHERE NOT DELETED() ;
AND Customer.State = 'CA'
ORDER BY Customer.CompanyName ;
INTO CURSOR curCustomer

In the above code, ProgressBarInit() is a method that initializes the Progress Bar. In this case, the Customer table's record count is passed to ProgressBarInit().

ProgressBarIncrement() is another method that increments the Progress Bar. This method will accept a value, but it defaults to 1 if no value is passed. The returned value from ProgressBarIncrement() is put into the "dummy" column called DummyCol1 in the query result. This technique works great if you don't mind having the "dummy" column appear in the result.

If you know how to use the ActiveX Progress Bar, then you can probably guess what the code in the ProgressBarInit() and ProgressBarIncrement() methods looks like. If not, I will be glad to provide the code for you.

By they way, I got the basic idea for this technique from someone here on the UT, but I can't remember who it was. To those of you who thought of it first, THANKS!

Bill
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform