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 -> XML-SQL Utility for PL/SQL: DBMS_XMLSave (inputting CLOB through JDBC)

XML-SQL Utility for PL/SQL: DBMS_XMLSave (inputting CLOB through JDBC)

From: <sappho_payne_at_yahoo.com.au>
Date: 23 Oct 2002 05:20:20 -0700
Message-ID: <6614719a.0210230420.7fc8639e@posting.google.com>


I am using Oracle 8.1.7 (OCI JDBC connection) and am trying to use the XML-SQL Utility in PL/SQL stored procedures to insert / update / delete rows based on inputted XML.

The DBMS_XMLSave functions require the XML in Clob format. I am wondering how I can convert the java String containing the XML to the Clob needed by my stored procedure. Through the Oracle documentation it seems you should be able to do this using the setCharacterStream() method which I tried as follows:

    Reader stringReader = new StringReader(sqlQuery);     cs.setCharacterStream(1, stringReader, sqlQuery.length()); but this just causes the following exception when I try and execute the stored procedure:

    SQL Exception:ORA-06550: line 1, column 7:     PLS-00306: wrong number or types of arguments in call to 'UPDATEROWS'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored

Can anyone tell me how I can create the required Clob?

Cheers,
Sappho Received on Wed Oct 23 2002 - 07:20:20 CDT

Original text of this message

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