Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Modified already installed table structure - how?
Message
From
03/09/1999 12:31:20
 
 
To
03/09/1999 09:49:42
Peter Brama
West Pointe Enterprises
Detroit, Michigan, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00260983
Message ID:
00261233
Views:
29
Yes, you should open the database first. You can create a new project and add only this utility into it as the main program and compile to an exe. As long as they have the VFP runtime (which they already do if they are running other VFP programs), it will run fine.

>Erik,
>
>Ok, this makes sense, now if can point this novice out a bit....
>
>Because I will not have the full runable VFP at the clients site... I assume I close the project and create a new prg file that has the modifing commands in it... I also assume I have to issue an OPEN DATABASE mydb first... is this correct? How do I go about making the program and an EXE that will be runable at the clients site?
>
>Thanks
>
>
>
>
>>>>>I have a table that is already being used in an installation. I need to modify the table structure to repair a bug and remove an unneeded field. The only way I know how to modify table structures is to use the Project Manager but that is NOT available on the clients site.
>>
>>The "Old-fashioned" method involves detailing the exact differences between the two version of the tables, and writing code to make the old one like the new.
>>
>>>>>#1 - How do I change an existing field type from character 15 to integer 4?
>>
>>ALTER TABLE MyTaable ALTER COLUMN MyField I
>>
>>Be aware that you will probably lose data here, and if oyu need to preserve anything in the field, oyu will want to do this in a couple of steps: adding a new column, populating it with VAL(OldField), deleting the old field, and then renaming the new to the old.
>>
>>
>>>>>#2 - How do I remove a field from the a table?
>>
>>ALTER TABLE MyTable DROP COLUMN MyField
>>
>>>>>#3 - How do I add a field to a table?
>>
>>ALTER TABLE MyTable ADD COLUMN MyField C(10)
>>
>>>>>#4 - I assume I am updating the clients existing database (somehow), but if I make these changes - what do I need to copy to the clients system. .dbc, .exe, ...)?
>>
>>You don't need to copy the dbc- it will be updated when you make the structure changes. You on;y need to copy a new exe if the exe has code in it that references the old fields, and the code needs to be updated.
Erik Moore
Clientelligence
Previous
Reply
Map
View

Click here to load this message in the networking platform