Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Test and live databases
Message
De
18/08/1998 21:53:21
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00127885
Message ID:
00127988
Vues:
28
>>>
>>>How do you copy a view from one database to another?
>>>
>>>
>>>TIA
>>
>>
>>I have a utilitity here in the files section called genview (the download file is called gentable.zip) that receives a view name as a parameter and creates a programmatic definition of the view. With this definition in hand, you can open you real database and run the program and the view and all of its properties are ireplicated in the second database. The file gentable.prg does the same thing but for tables.
>
>While this works without a hitch for the views, does GenTable update the DBF structure as well as the DBC? Otherwise you end up with an unValidated DBC file.

Gentable creates the listing to create the table, not for updating an existing table, so if your target table already has data in it, this is not the method to use. But when creating the table initially, the listing updates the dbc as well as recreating all indexes and extended information.

>Sylvain, I prefer to use SDT for this. One of their options allows you to copy the new DBC tables plus the latest SDT tables into your live database, then run their Update program. Every table is updated, with all data and indexes being brought into the new structure. It isn't fast, but it's accurate and you can send these files to a customer or other site if the SDT code is installed.

SDT is a great tool for this, but I have quit developing with it because when a project is in the early construction phase and table and views structures are changing rapidly, SDT costs me so much time as to be completely unusable. For databases that don't need to be distributed, I maintain views and indexes in code using gentable and genview.
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform