Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combining 2 databases
Message
From
06/04/2004 12:03:26
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
06/04/2004 11:57:52
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00892642
Message ID:
00892646
Views:
17
>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)
Previous
Reply
Map
View

Click here to load this message in the networking platform