Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Progress bar while indexing
Message
 
 
À
09/12/2004 11:52:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
SAMBA Server
Database:
Visual FoxPro
Divers
Thread ID:
00968025
Message ID:
00968052
Vues:
9
Just remember that if the table is a member of a DBC, then you have to drop the original table, then rename the temp table, then ADD the table back to the DBC. Then if there were any PKs, FKs, RI, etc., you gotta restore all that as well. Therefore, I use SDT to do this which also provides a nice UI for selecting table to reindex as well as UI showing index progress.

>Randy,
>
>There is a way but requires a little programming. Indexing a table requires exclusive access. So you could create an empty temp file of the same structure and index tags. Then USE the temp file and APPEND FROM OrginalFile FOR ProgressUDF() where the UDF performs whatever progress bar display you want.
>
>The UDF will be called for every record you are appending and therefore you can create a counter which you increment on each call. The counter vs. the total reccount count would give you a % processed. This in turn can be used to create your progress bar/meter/whatever.
>
>When the APPEND is complete you delete the original file and rename the temp file to the original file name.
>
>This technique does not add anything to the existing index tags and could even be used to physically sort the table into a particular order, perform the pack at the same time by not appending deleted records, and so forth.
Mark McCasland
Midlothian, TX USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform