>>>Are you using
<<lcSql>>
inside TEXTMERGE?
>>
>>
>>TEXT TO lcSql TEXTMERGE NOSHOW
>> select * from udf_Function(<<parameter>>)
>>ENDTEXT
>>This.mExecuteSqlCommand(lcSql, 'curCursor', '')
>>
>
>What is the exact code and the value of the 'parameter' in case when you get the errror?
That's the exact code. Parameter value is an integer. But it might have a problem. So, why would it cause recursive problem?