Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Alter Table
Message
De
14/05/2007 09:36:11
 
 
À
14/05/2007 08:44:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Divers
Thread ID:
01224484
Message ID:
01225214
Vues:
16
>>>>>>>Hi all,
>>>>>>>
>>>>>>>I have to do an Alter Table command on an indexed table. Am I loosing the index when I do that? And if so, how can I avoid it?
>>>>>>
>>>>>>
>>>>>>AFAIK No. There is no warning of such in Help, I've never heard of it and, indeed, I['ve done many an ALTER TABLE without even considering this.
>>>>>>
>>>>>>Howevr, if your alteration produces a new index, or, say, deletes a field that is already indexed, then obviously this will have an effect on your CDX file.
>>>>>>
>>>>>It works differently for tables and cursors. What you describe is true for tables, while cursors will lose index for any ALTER TABLE command.
>>>>
>>>>Aye, well he did say table.
>>>
>>>Right, but description of the problem pointed to a cursor. It is a rare case when table needs to be created and then altered in run-time, such scenario usually implies cursor.
>>
>>I have a good example of where one does. I create a Census table, with keys, then I have to read a spreadsheet to find out what the domains of the census are, to add to the table, e.g. "Unemployed females 0-2 children", et al.
>
>Most likely, you should design the table assuming all scenarios, i.e. once-in-place data structure will be able to accept any input.

Not at all. The names of the census enumerations change from year to year. One doesn't know which CSV from the census office will be purchased (how many cols, their names, etc.), and the domain names have to be understandable to the user. Also, the long descriptions can be cursorsetpropped into the table. Finally, my s/w works fine to handle all permutations.
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform