Cursors in Pro*C

From: Abe Jacob <abrahamj_at_planmatics.com>
Date: Thu, 4 Feb 1999 18:56:33 -0500
Message-ID: <lyqu2.7688$r%4.15881_at_news21.bellglobal.com>



Would anybody be able to tell me how I can do the following using dynamic SQL in PRO*C:

I have approx. 600 tables in my database, my program does inserts and selects on any of these tables depending on the table name and some other data passed to it. I follow the steps in the sample10.pc. I want to keep the cursors open so that I do not have to re-declare and close it for performance reasons.

The only way it seems I can do this by using some sort of a "if else" or "switch case" statement which will be a huge one (with 600 tables).

In INFORMIX ESQL/C I could declare a Host variable which could be used to declare a cursor so I could copy the table name into this host variable and then do the steps in sample10.pc. So the table name was my cursor name

Is their any way I can achieve what I want to do above in Oracle?

[Quoted] Thanks for the help.

Abe Received on Fri Feb 05 1999 - 00:56:33 CET

Original text of this message