Hi Joel
>VFP8
>I am working with a remote view of an SQL file. I copy it to a dbf and work with it, but I lose and long field names. How can I copy to a DBF and keep the long field names from the SQL file?
In order to preserve the long field names, which in VFP are stored in the DBC, the destination table must be a member of a DBC. The COPY command allows you specify the DBC as part of the command as follows:
COPY myview TO tmptable DATABASE tmptables
Of course, the problem now is that not only do you have the temporary table in the database but you cannot re-use it as a destination unless you first remove it from the database and delete it, using DROP TABLE (as opposed to simply deleting the DBF file) thus:
DROP TABLE tmptable
----
Regards
Andy Kramek