Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using UPDATE for Memo field
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00931478
Message ID:
00931552
Views:
16
Dmitry,

I can see two ways to to handle that. If array is in the scope when you issue INSERT or UPDATE, than you can reference array items directly.
cFieldValues = [myarray[3], myarray[1], ...]
If you insist on using values, than you can chack if there are CHR(13) or CHR(10) in the string and convert them. Something like
lcStr = "1 Line" + CHR(13) + CHR(10) + ;
		"2 Line" + CHR(13) + CHR(10) + ;
		"3 Line" + CHR(13) + CHR(10)

lcStr4Insert = ["] + STRTRAN(lcStr,CHR(13)+CHR(10), [" + CHR(13)+CHR(10)+ "]) + ["]
? lcStr4Insert
It's just a sample code. you'll have to adjust it to your requirements.

>>
>>What do you suggest to do in these cases? Or am I missing something?
>>

>>
>>Do not to use Macro substitution.
>
>I don't seem to know how to do it with without Macro. I tried to replace Macro with Evaluate() but I get error "Syntax error".
>
>Basically I build in code the expression like this:
>
>
>cInsertString = "INSERT INTO RR_RESER (" + cFieldNames + ") values (" + cFieldValues + ")"
>
>
>Then I need to execute this command. And the way I do it is by:
>
>
>&cInsertString.
>
>
>How can I execute this code without Macro?
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform