views:

255

answers:

1

I have a type myType declared with a member procedure insert_obj.

When i try this code, i get the following error:

declare
   v_obj myType;
begin
   v_obj.insert_obj(1,2,3);
end;

ORA-30625: method dispatch on NULL SELF argument is disallowed

I am assuming this is because i have no object on which to call the method...

but i cannot do

select value(a) into v_obj from myTable 

because the table is empty (and i want to insert into it).

How then do i get an object to call my method on?

Thanks

A: 

You can use a constructor:

v_obj myType := new myType();
klausbyskov
does this work if myType has parameters?
joec
No, but you can supply the parameters.
klausbyskov