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: Error creating package

Re: Error creating package

From: damorgan <dan.morgan_at_ci.seattle.wa.us>
Date: Thu, 14 Feb 2002 18:36:41 GMT
Message-ID: <3C6C03BA.53A7D317@ci.seattle.wa.us>


Is MYSCHEMA really your schema? Or is it someone elses?

If someone elses are the rights granted to you through a role?

Daniel Morgan

Andy Rigby wrote:

> I am trying to create a package that will let me return a cursor from
> an Oracle table (MYSCHEMA.TBL19) via ADO. I am following some sample
> code found in this newsgroup, but I keep getting an error in the
> package body when compiling it:
>
> See below for the error messages:
>
> /////////////////////////
> Oracle database (8.1.7)
> /////////////////////////
>
> SQL> create or replace package adoDemo
> 2 as
> 3 type rc_emp is ref cursor;
> 4 procedure getEmployees(p_cursor out rc_emp);
> 5 end adoDemo;
> 6 /
>
> Package created.
>
> SQL> create or replace package body adoDemo
> 2 as
> 3 procedure getEmployees(p_cursor out rc_emp) is
> 4 begin
> 5 open p_cursor for select ename from MYSCHEMA.TBL19;
> 6 end getEmployees;
> 7 end adoDemo;
> 8 /
>
> There are 2 errors which appear:
>
> 5/25 PL/SQL Statement ignored
> 5/43 PLS-00201: identifier 'MYSCHEMA.TBL19' must be declared
>
> But MYSCHEMA.TBL19 exists and I can select from it (select * from
> MYSCHEMA.TBL19) so I cannot see where the problem lies.
>
> Andy
Received on Thu Feb 14 2002 - 12:36:41 CST

Original text of this message

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