Dan Musicant
2011-01-28 17:41:27 UTC
This is for me a head scratcher. I'm using VFP 9.0 (possibly on FPW 2.6
compatible tables), and have a memo field that includes dates. The dates
have been converted to strings with the DTOC function. Many of the
entries in the field have multiple dates to which I've concatenated
CHR(13). So, for instance, one entry is:
10/20/2009
04/11/2008
09/30/2006
04/30/2006
04/28/2006
04/27/2006
04/26/2006
04/24/2006
04/22/2006
The edits to the memo field are usually done by code, not by manual
edits. What I'm finding, however, is that if I go in there and make a
manual change, theres an extraneous character inserted multiple times in
the field, being CHR(10). This causes output to my messaging function to
look strange with a black character. I've done a STRTRAN() against the
field in the Command Window to correct the problem:
REPLACE ALL lastwatchm WITH STRTRAN(lastwatchm,CHR(10),'')
This has fixed the problem. However, I'm wondering why CHR(10) is
getting in there in the first place and if there's something I can do to
prevent it from happening in the future other than embedding my fix in
recurring code.
Dan
Email: dmusicant at pacbell dot net
compatible tables), and have a memo field that includes dates. The dates
have been converted to strings with the DTOC function. Many of the
entries in the field have multiple dates to which I've concatenated
CHR(13). So, for instance, one entry is:
10/20/2009
04/11/2008
09/30/2006
04/30/2006
04/28/2006
04/27/2006
04/26/2006
04/24/2006
04/22/2006
The edits to the memo field are usually done by code, not by manual
edits. What I'm finding, however, is that if I go in there and make a
manual change, theres an extraneous character inserted multiple times in
the field, being CHR(10). This causes output to my messaging function to
look strange with a black character. I've done a STRTRAN() against the
field in the Command Window to correct the problem:
REPLACE ALL lastwatchm WITH STRTRAN(lastwatchm,CHR(10),'')
This has fixed the problem. However, I'm wondering why CHR(10) is
getting in there in the first place and if there's something I can do to
prevent it from happening in the future other than embedding my fix in
recurring code.
Dan
Email: dmusicant at pacbell dot net