Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replace chr(13) + chr(10)
Message
From
01/04/2019 14:41:56
 
 
To
01/04/2019 09:52:26
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01667754
Message ID:
01667814
Views:
50
>>>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
>
I'm guessing that the goal is to create a "universal" SQL command string that could either be passed into SQLEXEC() when using SQL database, or as a macro-expanded statement if using DBFs.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform