Fabio,
They couild word it better but the SET TEXTMERGE TO MEMVAR scope continues until SET TEXTMERGE OFF. Any TRY...ENDTRY in that scope will reset memory variable when error occurs. Does it make sense to me? No, but it's the way it works.
>
>This ?
>
>Avoid using the SET TEXTMERGE TO MEMVAR command within a TRY...CATCH...FINALLY structure because the memory variable will be lost if an error occurs in the statement.
>>Sergey, on my repro code,
>is SET TEXTMERGE TO MEMVAR within a TRY...ENDTRY structure ?
>No.
>
>
>The example that I have made demonstrates that SET TEXTMERGE only works if the program never does generate an error.
>Unacceptable.
>
--sb--