Calling member procedure NULL SELF argument Oracle
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 tabl开发者_Go百科e is empty (and i want to insert into it).
How then do i get an object to call my method on?
Thanks
You can use a constructor:
v_obj myType := new myType();
精彩评论