title: Error while executing the procedure : ORA-06530: Reference to uninitialized composite
body: <p>Not sure what is causing this error. I
  1) Have created an object as</p>
  
  <pre><code>  CREATE OR REPLACE  TYPE opt_val_rec AS  OBJECT (
      parametervalue     VARCHAR2(1),
      PARAMETERID          varchar2(4000)
      );
  </code></pre>
  
  <p>2) Have created a table type as</p>
  
  <pre><code>create  OR REPLACE  type  OPTVAL_TAB as  table of OPTVAL_REC;
  </code></pre>
  
  <p>3) Wrote a procedure as </p>
  
  <pre><code>    Create or replace  procedure test_parm_val (id in varchar2 ,result out  varchar2) as
  pos number:=0;
    test_paramval                                 OPTVAL_TAB:= OPTVAL_TAB (null);
  paramval_ord   OPTVAL_TAB:= OPTVAL_TAB (null);
  
  
  begin
  
  for I in (select DISTINCT param_name from  param_tbl)
  loop
  
  test_paramval.extend(10);
  POS :=POS+1;
  
  test_paramval (POS).PARAMETERVALUE:= get_param_val_fnc(id,I.PARAM_NAME);
  test_paramval(POS). parameterid:=I.PARAM_NAME;
  
  
  End;
  
  end test_parm_val
  </code></pre>
  
  <p>4) Now facing the error as
      ORA-06530: Reference to uninitialized composite</p>
  
  <p>Please help.</p>