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 -> Re-using Cursors in DBMS_SQL

Re-using Cursors in DBMS_SQL

From: <john_galt29_at_my-deja.com>
Date: Mon, 29 Nov 1999 18:03:47 GMT
Message-ID: <81uf60$rvm$1@nnrp1.deja.com>


I am using DBMS_SQL to create a bunch of tables, triggers, sequences, etc. Instead of creating a bunch of interegere variables like this:

Cursor1 integer default dbms_sql.open_cursor;

I would like to create one variable and just keep opening, parsing and closing it, changing the SQL statement each time. But even though I am careful to close the cursor each time, I get an "Invalid Cursor" error everytime I try to re-open a cursor with a different SQL statement ...

This must be possible. Can anyone tell me how to do this without creating 30 variables, all of which do the exact same thing?

Thanks.
John

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Mon Nov 29 1999 - 12:03:47 CST

Original text of this message

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