Article ID: 143245
Article Last Modified on 12/3/2003
* myprog.prg
SET SAFETY OFF
* Create a table named "mymemo" with one memo field named "notes"
* Append a blank record to the table
CREATE TABLE mymemo ( notes M(10))
APPEND BLANK
IF !USED("mymemo")
USE mymemo IN 0
ENDIF
IF !USED("customer")
USE customer IN 0
ENDIF
* copy the company and CONTACT fields to an ASCII tab-delimited text
* file
SELECT CUSTOMER
COPY TO mytext.txt FIELDS company, contact TYPE DELIMITED WITH TAB
* Place the ASCII file, Mytext.txt, into the memo field notes in the
* mymemo table
SELECT mymemo
APPEND MEMO mymemo.notes FROM mytext.txt OVERWRITE
* Replace each instance of double quotes with a blank
REPLACE notes WITH STRTRAN(notes,'"',"")
* Copy the corrected quoteless text back into another ASCII text file
COPY MEMO notes TO quoteles.txt
* Close tables
USE
SELECT customer
USE
* end program
Using any text editor, open Mytext.txt and observe the double quotation
marks around the character fields. Then open Quoteles.txt to confirm that
the quotation marks have been removed.
Additional query words: FoxWin FoxDos FoxMac VFoxWin quotes
Keywords: kbcode KB143245