Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combining 2 databases
Message
De
06/04/2004 12:03:26
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
06/04/2004 11:57:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00892642
Message ID:
00892646
Vues:
16
>Does anyone have any ideas on a way to combine to databases into a third database contining all tables, local views, remote views contained in the 2 original databases.
>
>
>
>Thanks
>Gary

Of course, you run the risk of objects having the same names.

To copy an individual table, use COPY TO ... DATABASE XYZ.

To get a list of tables in a database, use ADBOBJECTS().

I don't find a built-in command to copy a view, and stored procedures seem problematic as well.

I would suggest you manually create the new (combined) database, without records, and then write a procedure to do an APPEND FROM for each of the contained tables. Unless, of course, somebody else knows an easier way to do this.

HTH,

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform