Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Rename fields
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00812499
Message ID:
00812510
Vues:
17
>Hello to all :
>How can I rename (change the name of a field) from a table, in Run time.

You can try doing a SELECT * (to get all the data), perform an ALTER TABLE to drop the field with the old name, and add the new one, then APPEND all the data back.

I don't recommend this process, anyway. I don't think that a renaming should be something so usual to make it a standard process. If it is not a standard procedure, the MODIFY STRUCTURE command is preety intelligent to do this without moving data back and forth.

Another chance would be opening the DBF with fOpen, and touching the header information. You can check the DBF header structure at the VFP help file. Of course, before trying to do this MAKE A BACKUP!!!

Hope this helps,
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform