How to Pass any object type to a Procedure?

From: The Elemenatlist <the_elementalist_at_hotmail.com>
Date: 11 Mar 2004 10:11:05 -0800
Message-ID: <d04b9a68.0403111011.6ef3620_at_posting.google.com>


Ok, simple enough question (Oracle 8i ) ... if I have:

create type o1 as object

    ( junk1 varchar2(100),
      junk2 number )
/

and I have a procedure:

create procedure p1

    ( in_parm1 o1 )
is
begin
<code>
end;
/

Then all is good in the world and it works.

However, if I also have another object:

create type o2 as object

   ( junk3 date,
     junk4 number )
/

How can I write Procedure "p1" to accept both object types?

... and before you answer "overload the procedure", how do I write the procedure to handle any number of different object types coming in?

The reason I need to do this - take a look at DBMS_AQ.enqueue function. The Payload parameter ... it shows up as "Standard", and can accept any Object type when called. I need to duplicate that functionality ...

Does anyone know how to do this in Oracle 8i ?? (I'm hearing that it might be possible in 9 or 10 .. so I guess that might encourage an upgrade .. but I'll worry about that as a seperate issue!! lol )

Thanks!! Received on Thu Mar 11 2004 - 19:11:05 CET

Original text of this message