Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> recursion in Pro*C

recursion in Pro*C

From: Alan D. Mills <alanmNOSPAM_at_uk.europe.mcd.mot.com>
Date: Tue, 27 Oct 1998 13:27:33 -0000
Message-ID: <714hmn$o2e$1@schbbs.mot.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US