Re: recursive function with cursor
Posted in 1997
Thomas J. Girsch — — source: Informix-list mailing list archive (1991-1998)
Using cursors in recursive function calls is NOT recommended. You'll probably need to find a non-recursive way to do it. It _can_ be done (see John L's post) but if you succeed your program is going to be a HUGE memory and CPU pig. If you're willing to sacrifice performance, you can get it to work, but it's usually not a good idea. There's a book out called "Algorithms in C" (also available for C++ and PASCAL, at minimum) that has a good section on removing recursion from algorithms. Michal Hajek wrote in message <3499337D.63C1@nspuh.cz>... >Hi, > >I want to use cursor in recursive function. But program >stops with error -400 "Fetch attempted on unopen cursor". >The same function without recursive call works good.