Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting the process records in a sql-select statement
Message
 
To
05/02/1999 00:20:09
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00184105
Message ID:
00184622
Views:
19
>This will only work for a single table query (the original question involved a 3 table join), because any query that uses multiple tables might not access any one of the table's records on a one-to-one basis, and you would end up with a progress bar whose position means very little or nothing.
>
>It is a good method, though, for single table operations. You can also use it in batch udpate and delete commands
>
>REPLACE MyTable.MyField WITH "howdy" FOR oProgress.Update() && or whatever.
>
>But this also gets back to a point I made earlier- your update code will be run once for every record in the source table, and this is going to cost you a serious hit in performance.

Erik --

You're right about the performance, but I have found that this technique provides acceptable throughput in cases where the SELECT returns up to a few thousand records.

Depending on your business requirements, it might be OK to sacrifice a little performance in order to give the user some "visual feedback" like a progress bar. Sometimes a process appears to run faster (even though it is really slower) if something "busy" is happening on the screen to make it look like work is getting done. Maybe it is just a matter of keeping the user entertained until the process finishes.

As for a multiple table join, you can attain some semblance of accuracy with this technique by associating the progress bar functions with the "primary" table. You were correct when you said that the progress bar's position would not accurately represent the true state of progress, but in this case, "close" might be good enough when all you're trying to do is give the user some visible sign of progress.

Thanks -- Bill
Previous
Reply
Map
View

Click here to load this message in the networking platform