Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy Structure from Fox 6 to Fox 2 4

Status
Not open for further replies.

konLao

Programmer
Mar 10, 2003
61
US
I'm using Visual FoxPro 6.0. I want to copy table's structure to Fox 2.6 version. I use...

Copy structure to tblWhatEver

How can I make my new table Fox2?

Thank you,

KonLao
 
If you look at Visual Foxpro's Help listing for COPY TO you will notice the FOX2X option which can be used.

You can copy the original table itself or just a few records into a new table using this option and the result will be Fox 2.x compatible.

Good Luck,


JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
 
All I need is the structure not the file.
One way to do this,
copy to tblWhatEver
set safety off
use tblWhatEver
zap
set safety on


Thank for response,

KonLao
 
Or, try this (it gives you an empty Fox2x-type DBF with the same structure as the selected alias):
Code:
copy to (lcNewFileName) TYPE fox2x WHILE .F.

Or, if you really "just want the structure":
Code:
COPY STRUCTURE EXTENDED TO (lcTempFileName)
COPY TO (lcNewFileName) TYPE fox2x
 
You may wish to keep the indexes from the first table - if so, include the CDX or PRODUCTION clause

[WITH] CDX | [WITH] PRODUCTION
Creates a structural index file for the new table that is identical to the structural index file of the existing table. The tags and index expressions from the original structural index file are copied to the new structural index file. The CDX and PRODUCTION clauses are identical. However, do not include CDX or PRODUCTION if you are copying to a file other than a new Visual FoxPro table.

Jim Osieczonek
Delta Business Group, LLC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top