Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cursor variables

Status
Not open for further replies.

suggs

Programmer
May 15, 2001
10
DE
I am trying to start to use cursor variables I believe i have declared properly but get the following error on this code:
I will be trying to pass the cursor with a table name


CREATE OR REPLACE PACKAGE archive_database AS

CURSOR get_tables(p_owner VARCHAR2) RETURN dba_tables%ROWTYPE;
CURSOR get_columns(p_table VARCHAR2) RETURN dba_tab_columns%ROWTYPE;
CURSOR get_tab_data IS REF CURSOR;
PROCEDURE select_data (v_owner VARCHAR2);
PROCEDURE get_data(alldata IN OUT get_tab_data, p_table VARCHAR2);

END archive_database;
/


LINE/COL ERROR
-------- -----------------------------------------------------------------
5/25 PLS-00103: Encountered the symbol "REF" when expecting one of the
following:
( select

cheers
suggs
 
You need to TYPE your ref cursor as follows:

TYPE get_tab_date IS REF CURSOR;

NB you can use a strong as well as weak cursor for REF CURSORS...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top