Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Newbie package/procedure syntax help
Thanks that compiled!
I'm getting a new error when I try to execute the procedure though. Do
I need to include some sort of argument for the cursor when executing?
Here is what I executed and the error:
SQL> execute pack1.get_users('user2');
BEGIN pack1.get_users('user2'); END;
*
ERROR at line 1:
ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'GET_USERS' ORA-06550: line 1, column 7:
In article <94ps27$slb$1_at_nnrp1.deja.com>,
Mike Krolewski <mkrolewski_at_rii.com> wrote:
> 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;
> > /
> >
>
>
>
>> > http://www.deja.com/
> > Sent via Deja.com
>
>
Sent via Deja.com
http://www.deja.com/
Received on Thu Jan 25 2001 - 12:59:32 CST