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 -> Get 6350 error when I try to populate object.

Get 6350 error when I try to populate object.

From: Brad Allen <ballen_at_srdnet.com>
Date: Wed, 3 Apr 2002 15:55:34 -0800
Message-ID: <uan5j9livmibfc@corp.supernews.com>


I am trying to parse a simple xml document. I get an ORA-06530 error when I try to populate the row object.

My object is declared as follows:

create type poRow_type as object
(
  poname varchar2(20),
  postreet varchar2(20),
  pocity varchar2(20),
  postate char(2),
  pozip char(10)
);
/
create type poRow_list as TABLE of poRow_type; /

I am using a function to parse it as follows:

create function poExplode_func (arg IN sys.XMLType) return poRow_list pipelined is
  out_rec poRow_type;
  poxml sys.XMLType;
  i binary_integer := 1;
  argnew sys.XMLType := arg;
begin

  loop

I am calling the function with this select:

select *

   from TABLE( CAST(

      poExplode_func(
       sys.XMLType.createXML(
         '<?xml version="1.0"?>
          <POLIST>
           <PO>

<PONAME>Po_1</PONAME>
<POADDR>
<STREET>100 Main Street</STREET> <CITY>Sunnyvale</CITY> <STATE>CA</STATE> <ZIP>94086</ZIP>
</POADDR>
</PO> <PO>
<PONAME>Po_2</PONAME>
<POADDR>
<STREET>200 First Street</STREET> <CITY>Oaksdale</CITY> <STATE>CA</STATE> <ZIP>95043</ZIP>
</POADDR>
</PO> </POLIST>')

   ) AS poRow_list));

 and I get the following error:

The following error has occurred:
ORA-06530: Reference to uninitialized compositeORA-06512: at "CCDADMIN.POEXPLODE_FUNC", line 16ORA-06512: at line 1

Line 16 is the first time out_rec is used.

Please help.

Thanks. Received on Wed Apr 03 2002 - 17:55:34 CST

Original text of this message

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