Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Object types

Object types

From: Mark <mark.harris.nospam_at_ukonline.co.uk.nospam>
Date: Sun, 23 May 2004 16:11:54 +0100
Message-ID: <40b0bf78$0$2280$afc38c87@news.easynet.co.uk>


I've created an object type in my database:

CREATE OR REPLACE TYPE myType AS OBJECT(id NUMBER);

I then use this as a parameter to a function in a package:

TYPE myRefCursor IS REF CURSOR;

FUNCTION myFunc(myTypeVar IN myType)
RETURN myRefCursor;

I'd like to test the function works OK by running it in a PL/SQL block. I've tried the following:

begin

    x myType;
    y myRefCursor;

    x.id := 14;

    y := myPackage.myFunc(myTypeVar => x) end;

But the error message I get back is:

PLS-00103: Encountered the symbol "myType" when expecting one of the following:
:= . ( @ % ;

Doing a search on the words "object" and "type" in Metalink, Google, etc brings back loads of hits, but I've not found any which mention the problem I am facing.

Version 8.1.7.

Thanks for any assistance,

Mark Received on Sun May 23 2004 - 10:11:54 CDT

Original text of this message

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