Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copying a database...
Message
 
 
À
26/08/2004 10:50:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00936610
Message ID:
00936681
Vues:
15
>Hi All:
>
>I'm starting a new project and I want to use the database from a previous project. So basically I want to copy the whole thing, just rename it. I there a way I can do this?
>
>Thanks,
>Luke

The easiest way to do this is to run the GENDBC program against the existing DBC.

DO HOME() + [Tools\GenDBC\GenDBC] with 'OutputPRGName.PRG'

This will create a PRG file with all the code needed to create the DBC and everything in it except the data. Modify the PRG and change the name of the DBC it creates to whatever you want. GENDBC will also create a file of the same name as the output PRG file it generates except it will have a KRT extension. This is the stored procedure code from your existing DBC.

Save your changes to the PRG output file and copy it and the companion KRT file to the folder where you want the new DBC, tables, etc., to be created in. Run the PRG file. Next, create your own PRG file to loop through all the tables in the new DBC and APPEND FROM the original tables if you need the data from them.
Mark McCasland
Midlothian, TX USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform