Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Rename fields
Message
From
22/07/2003 15:35:52
 
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00812499
Message ID:
00812510
Views:
16
>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,
Previous
Reply
Map
View

Click here to load this message in the networking platform