Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy a table structure
Message
From
28/03/2006 18:36:07
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
28/03/2006 15:08:36
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01108563
Message ID:
01108633
Views:
14
>i want to copy the structure of my table arinv to a new table called arinv_archive

copy next 0 to mytable with cdx [database "dbcname here"]

If you include the database clause, it will also copy long field names, but not the RI code, field comments etc.

If you want these extended things, you may run home()+"tools\gendbc\gendbc" and then edit the code it produces. It will create one procedure per table/view, so you can pretty much pick which one you want and then change the table name. The generated procedure contains commands to reproduce all the extended settings. Two caveats here: 1) won't work if the target table isn't a part of a database, 2) the generated code behaves badly with paths, it either generates full paths or no paths at all, depending on version. You may just go to the directory where the tables are and run it there, or adjust the paths in the generated code to be relative to where the code is run from.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform