Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replace chr(13) + chr(10)
Message
From
01/04/2019 09:52:26
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
01/04/2019 05:38:55
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01667754
Message ID:
01667805
Views:
53
>>If you are using direct commands then you could simply do the insert, then your problem doesn't even make sense. ie:
>>
>>
>>Create Cursor test (Id Int, dummy Memo)
>>Local ix, lcText
>>
>>Insert Into test (Id, dummy) Values (1, 'Line 1' + Chr(13)+Chr(10) +'line 2')
>>Insert Into test (Id, dummy) Values (2, 'Line 1' + Chr(13)+Chr(10) + ;
>>	'Line 2' + Chr(13)+Chr(10) + ;
>>	'Line 3' + Chr(13)+Chr(10) + ;
>>	'Line 4')
>>
>>Locate
>>Browse
>>
>
>I think this is prepared to be run as a macro, but even then there wouldn't be a problem if macro was
>
Insert Into test (Id, dummy) Values (1, lcLines)
>and the variable lcLines was in scope. But he wants the command (to be macro expanded) containing a string literal with a line break to work... well, that won't work.

I don't understand why one would even want to do that. It is an abuse of macro expansion. Even if one wants to do that, still I can't see the problem (I would never prefer to do but doable):
Text to lcCommand pretext 15 noshow
Insert Into test (Id, dummy) Values (2, 'Line 1' + Chr(13)+Chr(10) + 
	'Line 2' + Chr(13)+Chr(10) + 
	'Line 3' + Chr(13)+Chr(10) + 
	'Line 4')
EndText

&lcCommand
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform