Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bloated index files
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00111996
Message ID:
00112327
Vues:
22
Thanks Bill - I found lots of new things once I delved into the GENDBC stuff. But its all a bit overwhelming when a newbie arrives via some early xbase and thinks that VFP is just the same. The time spent in the samples supplied with VFP is time well spent.
Andrew
>Good point, Andrew...GENDBC is a great place to start. Just to clarify -- ALTER TABLE will take care of persistent relationships, but it does not handle RI specifically. The RI codes are contained in the .DBC column called RIInfo, and ALTER TABLE does nothing that affects this column. The values in RIInfo must be set "the hard way" with code...by this, I mean that there is no ALTER TABLE clause or VFP function that will take care of RIInfo. However, GENDBC does offer a clear example of how this is done.
>
>Another point -- the ADBOBJECTS() function will retrieve the values in RIInfo if the RELATION parameter is used. For example: ADBOBJECTS(aMyArray, 'RELATION') returns a 2-dimensional array that contains persistent relationship and RI information -- the RI codes are in the 5th column.
>
>Bill
>
>>Just to add my .02 worth. Run GENDBC and have a look at its output. Also beware - dropping the .cdx will drop all of your RI which has to be rebuilt. ALTER TABLE is very useful for us short sighted folk.
>>
>>>You are correct -- in the "old days" (FPW 2.x), this was fairly easy to do, and most of us built some sort of "Rebuild Indices" routine into our applications to take care of this problem. We also learned to avoid the REINDEX command...it provides a quick fix in most cases, but was technically unsound for various reasons.
>>>
>>>In VFP, however, one cannot just blow away tags and/or .CDX's as in FPW. The .DBC contains data about certain types of indices and referential integrity, and you need to consider this when you rebuild an index. You may want to look into the ALTER TABLE command...it will enable you to rebuild primary, candidate, and foreign keys, as well as do various other things to your tables. However, be forewarned about ALTER TABLE...be careful, and be sure that you know what you are doing.
>>>
>>>Hope this helps -- Bill
>>>
>>>>The .cdx files are supposed to be compact but over a period of time they tend to increase in size.
>>>>
>>>>In Fpw26 you could periodically delete all .cdx files and recreate them. But in Vfp if the tables are part of a database, you can not delete the .cdx files since when you open the database, vfp gives an error message.
>>>>
>>>>Is there a way to re-create the .cdx files so that they remain true to their name?!
>>>>
>>>>Please tell me if you have found a way!
>>>>
>>>>Eswar
>>>>26.06.98
>>>>India
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform