Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting the process records in a sql-select statement
Message
 
To
04/02/1999 17:56:04
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00184105
Message ID:
00184186
Views:
19
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform