Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Object types
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
![]() |
![]() |