Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Modified already installed table structure - how?
Message
De
03/09/1999 09:49:42
Peter Brama
West Pointe Enterprises
Detroit, Michigan, États-Unis
 
 
À
03/09/1999 00:13:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00260983
Message ID:
00261118
Vues:
29
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.
Peter Brama
West Pointe Enterprises

VFP is getting easier but STILL alot to learn!!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform