kathuria
2nd June 2005, 08:01
Hi,

I wrote one function in main script. I am calling this function recursive. It's giving error Error: SQL State HY010 - Function sequence Error - Fectch called out of sequence - (function name(select.tfgld008()) in object name(otfpol1406m500)

Function is :

function select.tfgld008()
{
select tfgld008_s.leac:cleac,tfgld008_s.subl:csubl,tfgld008_s.plac:cplac
from tfgld008 tfgld008_s
where tfgld008_s.leac =:leac
selectdo
update.array()
leac = cplac
select.tfgld008()
endselect
}


Regards
Sanjay Kathuria

lbencic
3rd June 2005, 16:53
Unfortunately direct recursion does not seem to be supported. Check this post on recursion (http://www.baanboard.com/baanboard/showthread.php?t=22850&highlight=recursion) to see what others have done to get around it.

Good luck.