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

Home -> Community -> Usenet -> c.d.o.server -> Re: Newbie package/procedure syntax help

Re: Newbie package/procedure syntax help

From: Mike Krolewski <mkrolewski_at_rii.com>
Date: Thu, 25 Jan 2001 18:42:17 GMT
Message-ID: <94ps27$slb$1@nnrp1.deja.com>

In article <94pp13$pit$1_at_nnrp1.deja.com>,   james_one_at_my-deja.com wrote:
> Can anyone please tell me why this doesn't work? The package creates
> fine, but the body has 'complilation errors'. Client is 8.1.6. DB is
> oracle 7.3.
> Thanks.
>
> CREATE OR REPLACE
> PACKAGE PACK1 IS
> TYPE CURSOR_TYPE AS REF CURSOR;
> PROCEDURE GET_USERS (USER_NAME IN CHAR,
> O_RESULT_SET OUT CURSOR_TYPE);
> END;
> /
> CREATE OR REPLACE
> PACKAGE BODY PACK1 AS
> PROCEDURE GET_USERS (USER_NAME IN CHAR,
> O_RESULT_SET OUT CURSOR_TYPE)
> AS
> BEGIN
> OPEN O_RESULT_SET FOR
> SELECT FULLNAME, PASSWORD
> FROM USER_INFO
> WHERE USERNAME = USER_NAME;
> END;
> END;
> /
>

Your cursor O_RESULT_SET needs to be 'in out'

As with all problems you should list the code ( as you did) plus the error message. Often the error number is sufficient. More or too much data is easy to ignore.

It is possible/likely that no one who is reading this could reproduce your specific error as they do not have your environment.

> Sent via Deja.com
> http://www.deja.com/
>

--
Michael Krolewski
Rosetta Inpharmatics
mkrolewski_at_rii.com
              Usual disclaimers


Sent via Deja.com
http://www.deja.com/
Received on Thu Jan 25 2001 - 12:42:17 CST

Original text of this message

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