Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to Progress Bar While search in Progress
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01037519
Message ID:
01037620
Vues:
13
>>Yes Peter,
>>this UDF takes more minutes(original ~ more than 1 to 2 minutes , with UDF may be multiple 5).
>>Why not with VFP BUILD-IN progress bar.
>
>Vladimir,
>You're suggesting that the function will use 3 minutes for 4 million records. But first, it is only called each 100 records (and this can easilly be changed to let's say 1000 records). Second, if the function is programmed efficiently, one call will use only some microseconds. This can be calculated by doing a sql-select that skips through a number of records, while only having this single where clause. Let's say, it are 4 million records, each 100 records a call. That gives 40.000 calls. Once in a thousand records, 4000 calls only. The function must be a dragon if this requires 3 minutes. I expect some 20 seconds only, for the 100 records one. That will then be the trade-off for the extra user-friendlyness.
>

Peter,
Raj can try your suggestion and i wait for Raj's answer after his tests.
>>
>>
>>>You can call a function, that displays/updates a progress bar, in the WHERE clause. But, to prevent a major performance drop, you should prevent that this function is called each record. So, the expression should be something like:
WHERE iif(mod(recno(),100)=0,progressbar(recno(),reccount()),.t.) ;
The function progressbar() should return a dummy .t., of course.
>>>
>>>>I have a String search function, It searches more than 4 million Records.
>>>>It takes more than 1 to 2 minutes to make the String search.
>>>>Please How can i show a progress bar while search in progress. Thank you very much for the help.
>>>>
>>>>LcSQL = [select distinct(a.tiffile), b.proj_no, b.workpkg_no, c.tofrm, c.sequence,;
>>>>c.docdesc, c.org1, c.author1,c.reciporg1,c.recip1, c.ref1, c.docindex_i ];
>>>>+[from ocrdata a, docudeck b, docindex c ;
>>>>WHERE UPPER(b.file_name) = UPPER(a.tiffile) ;
>>>>and b.docindex_i = c.docindex_i ;
>>>>and Upper(a.OCDATA) like "%] + Upper(alltrim(stxtocrstring)) + [%"] + swhere +;
>>>>[ order by a.id into Cursor lcSource]
>>>>******************
>>>>
>>>>
>>>>WAIT WINDOW "OCR Search in Progress"
>>>>&LcSQL
>>>>
>>>>with thisform.pageframe1.page3.grid1
>>>>	.RecordSource = ""
>>>>	.RecordSourceType = 1 &&1 - Alias &&4 - SQL
>>>>	.RecordSource = "lcSource"
>>>>endwith
>>>>WAIT CLEAR
>>>>
_______________________________________________________________
Testing displays the presence, not the absence of bugs.
If a software application has to be designed, it has to be designed correctly!
_______________________________________________________________
Vladimir Zografski
Systems Analyst
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform