Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> XML-SQL Utility for PL/SQL: DBMS_XMLSave (inputting CLOB through JDBC)
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