Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: using xmltype and jdbc insert

Re: using xmltype and jdbc insert

From: Olaf Raether <olaf_at_raether.de>
Date: Wed, 23 Apr 2003 09:22:54 +0200
Message-ID: <epfcavorqn3q1c7o381a2oqdpo3d203t8i@4ax.com>


TAke a loook at this link, i think this could help you

http://groups.google.de/groups?q=clob+oracle+jbuilder&hl=de&lr=&ie=UTF-8&oe=UTF-8&scoring=d&selm=3ca26a28%241_2%40dnews&rnum=9

Olaf Raether

On 22 Apr 2003 03:31:40 -0700, scottb022563_at_hotmail.com (Scott) wrote:

>Olaf Raether <olaf_at_raether.de> wrote in message news:<r3b8av4m5hci70n8kjfs5cgb3hc4b866dd_at_4ax.com>...
>> Hey,
>>
>> if you only want to store an XML-File, use CLOB.
>
>Thanks but this fails, do I need to cast the doc?
>Document doc=XMLUtils.createDocFromStream(is);
> stmt=con.prepareStatement("insert into xml_test
>values(?)");
> stmt.setClob(1,doc);
>
>
>Error The method setClob(int, Clob) in the type PreparedStatement is
>not applicable for the arguments (int, Document) XmlTest.java blc
>framework/WEB-INF/classes line 36
>
>>
>> Olaf Raether
>>
>> On 21 Apr 2003 06:24:19 -0700, scottb022563_at_hotmail.com (Scott) wrote:
>>
>> >I am having trouble inserting a document into a table. What is the
>> >correct datatype to use for a column specfifed as xmltype? here is a
>> >simple exmple below. thanks for the help
>> >
>> >Scott
>> >
>> >CREATE TABLE XML_TEST Oracle 9i
>> >(
>> > DOC SYS.XMLTYPE
>> >)
>> >
>> >
>> >import org.w3c.dom.*;
>> >
>> >InputStream is=PropertiesUtils.loadResourceAsStream("HealthAutoInventoryInputTemplate.xml");
>> > Document doc=XMLUtils.createDocFromStream(is);
>> > stmt=con.prepareStatement("insert into xml_test
>> >values(?)");
>> > stmt.set????(1,doc);
Received on Wed Apr 23 2003 - 02:22:54 CDT

Original text of this message

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