I've a problem with COPY TO and DBF.
I've some fields name with a lenght majior of 10 characters, when I use COPY TO (myDBFName) without parameters the fields name are truncated.
Main Topics
Browse All TopicsHi, I must create a Procedure to Export a Cursor from Visual FoxPro into a File (With MEMO FIELDS) and Import it in another remote Clients.
I try to use COPY TO (myFileName) CSV but the memo fields loselly...
Can anyone help me?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
First, you have not told us if the recipient needs to receive DBF files or not.
Regardless, you can always use the COPY TO command and export to another file format (see your VFP Help) such as a text file. Then onto that text file you can append your own Header row with the full length field names.
Then the recipient would need to Import from the Text file.
NOTE - if their end need is to get the data into a DBF file, then the field names will most likely be truncated to VFP's 10 character length anyway unless the data table is in a VFP database.
Good Luck
Business Accounts
Answer for Membership
by: Olaf_DoschkePosted on 2009-11-06 at 02:54:14ID: 25758054
You could simply use COPY TO ...DBF to export to a DBF and have memo fields too. But if you need CSV there's no single command to export to CSV or SDF format. If you need CSV you need to do a little programming. Not trivial, as you need special handling of quotes within memo fields.
om/kb/2414 24/en-us
IIRC Cetin and others have posted some code or link here already.
This for example would output memo fields too: http://support.microsoft.c
Bye, Olaf.