Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Michal Hajek — — source: Informix-list mailing list archive (1991-1998)
Scott Black wrote:
> By now you see the problem. On the second time through I get error -400
> (Fetch attempted on unopen cursor). Tech support says that this is the
> way it is designed, you cannot re-use a cursor without first closing it.
> It seems to me that each recursive call should be within it's own stack
> and that re-using variables, cursors and the like should not be a
> problem, but...
But... I posted the same some time ago (input :-). Output: cursor names
works like "global" variables and therefore closing cursor xxx_cursor in
child procedure means also error when parent next does "fetch
xxx_cursor".
I did not found solution for 4gl, mean nice solution for nice
strightforward
recursive calling.
Solution of problem of mine: I knew there won't be more than 10 level
recursive
calling - I wrote 10 procedures with 10 cursor names (and error
statement
in 10th when it would need to go deeper).
Sorry.
Michal Hajek
--
--------------------------------------------------------------
Michal Hajek mailto:hajek@nspuh.cz
Sprava NIS http://www.nspuh.cz
NsP Uherske Hradiste phone : voice +420 0632 529 204
Purkynova 365 fax +420 0632 551 014
686 68 Uherske Hradiste Czech Republic
--------------------------------------------------------------
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.