PL/SQL Create Object type within a package

From: Manfred Pruntsch <manfred.pruntsch_at_ifcos.com>
Date: Fri, 16 May 2003 19:27:52 +0200
Message-ID: <ba374b$p5i6h$1_at_ID-51546.news.dfncis.de>



[Quoted] Hi all,

I want to have a object type within a package:

CREATE OR REPLACE PACKAGE packageABC AS

     create or replace type Point as object (x integer, y integer); -- 1. try

  • type Point as object (x integer, y integer); -- 2.try

END packageABC;

I've got this errormessage by the 1. try: Error: PLS-00103: Encountered the symbol "CREATE" when expecting one of the following:

          end function package pragma private procedure subtype type
[Quoted]           use <an identifier> <a double-quoted delimited-identifier>
          form current cursor

and by the 2. try:
Error: PLS-00540: object not supported in this context. Line: 10 Text: type Point as object (x integer, y integer);

This example runs as standalone without any problems: create or replace type Point as object (x integer, y integer)

How do I get this example running in a package? This type is only used by the package and it make sense to put all wedgets which belong together in the package.

And the next question is: when I have member functions where has to be placed the body of the type definition?

regards
Manfred Received on Fri May 16 2003 - 19:27:52 CEST

Original text of this message