Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Visual FoxPro
Expertise: Beginner
Dec 14, 1999

Memo Fields in FoxPro for DOS

Question:
I am working on a FoxPro for DOS system and I am using the COPY TO function to export the DBF to a (text or Microsoft Excel) file. However, the information contained in the Memo fields does not get exported. Why is this? How can I get around this?

Answer:
The help system for the COPY TO function states that Memo and General fields will not be copied even if you include their names in the field list. This is probably because most formats require fixed-length information, while memo and general fields are of variable length.

The only workaround (and it won't be a very good one) would be to create a temporary file with a 254-character field and store the first 254 characters of the memo field. Then the COPY TO will give you the first 254 characters. You could even have a couple of 254 character fields with segments of information that can be reassembled into a memo structure wherever you are sending the exported file.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap