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: Objects in Packages?

Re: Objects in Packages?

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 26 Feb 2007 07:01:16 -0800
Message-ID: <1172502076.137376.109550@v33g2000cwv.googlegroups.com>


On Feb 26, 1:06 am, "Vladimir M. Zakharychev" <vladimir.zakharyc..._at_gmail.com> wrote:
> On Feb 25, 10:57 pm, "Michael42" <melliot..._at_yahoo.com> wrote:
>
> > Hello,
>
> > in Oracle 10g R2 can Packages contain Objects (TYPE MyObj AS
> > OBJECT...) as it does with functions and procedures?
>
> > Thanks,
>
> > Michael
>
> No. Objects are top-level OR (Object-Relational) entities in Oracle
> and you can't declare them in PL/SQL packages (and I doubt this will
> change in 11g or any future release.) The only option you have is to
> create object types using CREATE TYPE and instantiate them from PL/
> SQL.
>
> Regards,
> Vladimir M. Zakharychev
> N-Networks, makers of Dynamic PSP(tm)
> http://www.dynamicpsp.com

Yes, you create the objects in Oracle and then reference and manipulate them in pl/sql: anonymous or stored.

I did not realize from your first post that your were actually trying to create them in your packages. That would be the same as trying to create tables and views in your code.

Define once, use many is the general rule in Oracle.

HTH -- Mark D Powell -- Received on Mon Feb 26 2007 - 09:01:16 CST

Original text of this message

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