Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Progress bar for a query
Message
From
17/04/2002 13:30:18
Jonathan Cochran
Alion Science and Technology
Maryland, United States
 
 
To
17/04/2002 09:46:27
Jonathan Cochran
Alion Science and Technology
Maryland, United States
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00645831
Message ID:
00645989
Views:
23
I tested the code below some more, and found that the function won't be called for every record if a filter is added to the WHERE clause. This could mess up the updating of a progress bar. It looks like it will work if you change the function to return .F., and use an OR in the WHERE clause instead of an AND.

>Although not a great solution, we use SET TALK ON.
>
>The following is another solution, though it may slow the query down somewhat.
>
>Create a program, for example Test.prg:
>
>pn_Count = pn_Count + 1
>IF MOD( pn_Count, 10 ) = 0 && This is .T. every 10 records.
>   * Update progress bar here.
>   ? pn_Count
>ENDIF
>
>RETURN .T.
>
>
>Code your select as follows:
>
>PRIVATE pn_Count
>pn_Count = 0
>SELECT * FROM MyTable WHERE Test() AND (...other conditions...)
>
>
>>Hello!
>>I wish to give al better look to my forms when I run a large query using ADO.
>>Now I show a 'wait window nowait after' the sql code and another at the end.
>>How can I grab the status of the query and use it to assign the progress bar value?
>>Thanks...
>>Pedro
Previous
Reply
Map
View

Click here to load this message in the networking platform