>>>>Hi Borislav
>>>>
>>>
>>>>'Compiled code for this line is too long'
>>>>
>>>>When I suspend the problem lies in this block of code:
>>>
>>>You don't need the macro here at all. Just use lcBodyText as is.
>>>
>>>>
>>>>* Convert body text field to data (if it is a field)
>>>>IF TYPE(lcBodyText)='M'
>>>> lcTemp=""
>>>>*!* FOR lnLoop=1 TO MEMLINES(&lcBodyText.)
>>>>*!* lcTemp=lcTemp+MLINE(&lcBodyText.,lnLoop)
>>>> FOR lnLoop=1 TO MEMLINES(lcBodyText)
>>>> lcTemp=lcTemp+MLINE(lcBodyText,lnLoop)
>>>> lcTemp=lcTemp+CHR(13)
>>>> ENDFOR
>>>> lcBodyText=lcTemp
>>>>ENDIF
>>>>
>>>
>>>And that's it.
>>
>>Maybe this code is designed to pass Memo field as parameter, not value of Memo field but its name as 'MemoField'.
>>If Memo is passed as Value then TYPE(lcBodyText) must raise an error.
>
>Right, didn't notice that. If he's passing a value, he should check for type(lcBodyText)='C' instead. At least that's what I'd do - pass it as value. But if the parameter did contain the memo field's name, he wouldn't be getting the "too long" error, would he?
No, he wouldn't. Just tested and he must not receive error anyway:
lcStr = [teststr]
? TYPE(lcStr) -> U (not error)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.