Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> recursion in Pro*C
In my history of Pro*C I've not come up against this before so I'm not sure
if it's actually possible. The question is about dynamic SQL.
My dynamic SQL statement is picked up from another table and executed as a cursor. For each record retrieved I may then want to build another dynamic cursor for it and so on. My question is. What is the scope of a cursor (dynamic or otherwise) within the Pro*C program. I thought it was global nomatter where the cursor is actually defined. Can I define a C function which builds and executes a dynamic cursor and for each record retrieved call the same function to open the next level of dynamic cursor, returning to the correct record of the previous on completion?
Is this possible as a recursive call. If not, can anyone suggest any alternative designs for this sort of thing.
I hope this is clear. Any help appreciated.
--
Alan D. Mills
Received on Tue Oct 27 1998 - 07:27:33 CST