Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Programatically adding a field to a table with Foxpro 2.
Message
From
12/04/2005 16:11:55
 
 
To
12/04/2005 15:47:58
Stephen Hunt
Admit Computer Services Inc.
Farmingdale, New York, United States
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Environment versions
Visual FoxPro:
FoxPro Dos
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
DB2
Miscellaneous
Thread ID:
01003936
Message ID:
01003944
Views:
25
Hi Stephen,

you must do it the hard way
Use yourtable
Copy structure extended to dummy1
Use dummy1
Append blank
Replace Field_name with yourfield, Field_type with 'C', Field_len with 12 && Change this line according to your need
Create dummy2 from dummy1
Use dummy2
Append from yourtable
Copy to yourtable
erase dummy1.dbf
erase dummy2.dbf
Use yourtable
You must also recreate the indexes one by one.



>I have an older application in fopro 2.6 for dos that I need to give an update to my clients on before I look at moving them to VFP 9. I am trying to Programatically adding a field to a table with "alter table {tablename} add column {column name} C(9)" and I am getting an error "Unrecognized command verb" was alter table a valid command in foxpro 2.6 ? and if not is there any other way that I can accomplish this task ?
>
>Thanks for your help !
>Stephen J. Hunt
Previous
Reply
Map
View

Click here to load this message in the networking platform