Home » Developer & Programmer » JDeveloper, Java & XML » PLS-00302: component 'GETBLOBVAL' must be declared
PLS-00302: component 'GETBLOBVAL' must be declared [message #199496] Tue, 24 October 2006 15:34 Go to next message
bhoite_amol83
Messages: 110
Registered: June 2005
Location: Pune
Senior Member
Hi Friends,
I have one problem while writing xmlfile in a perticular directory.

l_XMLFile := utl_file.fopen('Test', 'test.xml','w');
l_blob := l_xml.getblobval (31);

For the second line i am facing the error.

PLS-00302: component 'GETBLOBVAL' must be declared


Can anyone please tell me how to solve the problem?

Thnaks for any type of help.

Thanks in advance.
Amol.
Re: PLS-00302: component 'GETBLOBVAL' must be declared [message #199497 is a reply to message #199496] Tue, 24 October 2006 15:42 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Oracle
PLS-00302 component 'string' must be declared

Cause: In a reference to a component (for example, in the name "A.B", "B" is a component of "A"), the component has not been declared. The component might be misspelled, its declaration might be faulty, or the declaration might be placed incorrectly in the block structure.

Action: Check the spelling and declaration of the component. Also confirm that the declaration is placed correctly in the block structure.
Re: PLS-00302: component 'GETBLOBVAL' must be declared [message #199581 is a reply to message #199496] Wed, 25 October 2006 03:13 Go to previous messageGo to next message
bhoite_amol83
Messages: 110
Registered: June 2005
Location: Pune
Senior Member
Hi Littlefoot,

Thanks a lot for your reply.

I searched in my file for any wrong declaration.
But, i could not found the solution.
Can you please guide me on this.

Below is the code for writing into XML file.

/***********************************************/
CREATE OR REPLACE PROCEDURE Sp_Transport_Order_Write_Xml (
p_BOOKING_SEQ booking.BOOKING_SEQ%TYPE
) AS

CURSOR c_xml ( pc_data_seq booking.BOOKING_SEQ%TYPE ) IS
SELECT result
FROM V_TRANSPORTORDERMAIN_XML
WHERE BOOKING_SEQ = pc_data_seq ;

s_xml c_xml%ROWTYPE ;

l_XMLFile utl_file.file_type ;
l_month VARCHAR2(7) ;
l_Dir VARCHAR2(78) ;
l_blob BLOB ;
l_xml XMLTYPE ;

BEGIN

l_Dir := 'test';
l_XMLFile := utl_file.fopen(l_Dir, 'gpa_' || 1 || '.xml','w');

OPEN c_xml ( p_BOOKING_SEQ ) ;
FETCH c_xml INTO s_xml ;

l_xml := s_xml.result ;
l_blob := l_xml.getblobval (NLS_CHARSET_ID('UTF8'));

-- l_blob := l_xml.getblobval (NLS_CHARSET_ID('31'));

utl_file.put_raw( l_XMLFile , l_blob ) ;

CLOSE c_xml ;
utl_file.fclose(l_XMLFile);

END;
/****************************************************/


Thanks in advance.

Amol.


Re: PLS-00302: component 'GETBLOBVAL' must be declared [message #199611 is a reply to message #199581] Wed, 25 October 2006 04:28 Go to previous messageGo to next message
bhoite_amol83
Messages: 110
Registered: June 2005
Location: Pune
Senior Member
Hi friends,
I searched for error ""PLS-00302: component 'GETBLOBVAL' must be declared.

I find that 'GETBLOBVAL' function/procedure is only available in oracle 10g and not available in Oracle 9i.

Can anyone please tell me,
1:> Is it really not possible in oracle 9i???
2:> If not then how can i incoporate oracle 10g feature in oracle 9i.
3:> If it is not possible then can anyone tell me how can i write through oracle 9i.

I will be thankful if anyone help me.

Amol.
Re: PLS-00302: component 'GETBLOBVAL' must be declared [message #201245 is a reply to message #199496] Fri, 03 November 2006 04:39 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
The XMLTYPE does not have a GETBLOBVAL function.
It has GETSTRINGVAL, and GETCLOBVAL, but that's it, I'm afraid.
Previous Topic: XMLELEMENT/ XMLAGG functions
Next Topic: Oracle table data to a XML format
Goto Forum:
  


Current Time: Fri Nov 22 03:56:45 CST 2024