Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best way to programmatically update multi-line memo fiel
Message
From
27/08/2001 08:12:55
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00549121
Message ID:
00549384
Views:
29
Very good example, Sergey. Looking at it, I have seen this myself and just attributed it to a bug in the memo field. I resorted to just using the CR as you indicated. Now I have a better solution :>) You have converted me.

>Hi Jim,
>
>As you know, chr(13) + chr(10) combination is the standard end of the line in DOS/Windows an it's what foxpro puts in memo field when you press enter. I always use it because all foxpro command/function/tools treat it the same way.
>Here's a simple test that shows that it's not the case with chr(10) + chr(13)
>lcCRLF = chr(13) + chr(10)
>lcLFCR = chr(10) + chr(13)
>lcS1 = "Line 1"
>lcS2 = "Line 2"
>lcS3 = "Line 3"
>
>? lcS1 + lcCRLF + lcS2 + lcCRLF + lcS3 + lcCRLF
>? lcS1 + lcLFCR + lcS2 + lcLFCR + lcS3 + lcLFCR
>* the above two lines produce the same result
>CREATE TABLE temp (m1 memo)
>APPEND BLANK
>REPLACE m1 with lcS1 + lcCRLF + lcS2 + lcCRLF + lcS3 + lcCRLF
>MODIFY MEMO m1    && Looks the same as in ? command
>APPEND BLANK
>REPLACE m1 with lcS1 + lcLFCR + lcS2 + lcLFCR + lcS3 + lcLFCR
>MODIFY MEMO m1    && Extra empty lines
>
Some people're saying that CHR(13) is enough in memo field and it works but not always. Take a look at Thread #549166.
Previous
Reply
Map
View

Click here to load this message in the networking platform