devxlogo

Memo Fields in FoxPro for DOS

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.

See also  Small Business Strategies with Venmo
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist