>I'm using VFP with MySQL database
>
>anyone has any experience how to clean up the Enter key in the memo column in MySQL?
>
>thanks for the help.
Is this about memos containing only CRs, or are there also memos containing real text and having extra multiple CRs in the end?
In both cases you could just
replace all myMemo with rtrim(mymemo, 1, chr(13))
and then do a tableupdate() or whichever method of updating the db you use. If you have paragraphs with multiple CRs between them, you may first go in record by record
scan
do while chr(13)+chr(13) $ myMemo
replace mymemo with strtran(mymemo, chr(13)+chr(13), chr(13))
enddo
replace myMemo with rtrim(mymemo, 1, chr(13))
endscan
Of course, if your memo contains linefeeds as well (chr(10)), then this gets a bit more complicated - CR and LF may be in any combination, in any order. Then you may just replace each LF with a CR (using chrtran()) before the Do While above.